human
Complete this python program:
def TR15(rv, max=4, pow=False):
assistant
#Here is the Python program you requested.

    """Convert sin(x)*-2 to 1 + cot(x)**2.
    See _TR56 docstring for advanced use of ``max`` and ``pow``.
    Examples
    >>> from sympy.simplify.fu import TR15
    >>> from sympy.abc import x
    >>> from sympy import cos, sin
    >>> TR15(1 - 1/sin(x)**2)
    -cot(x)**2
    """
    def f(rv):
        if (not (isinstance(rv, Pow) and (rv.base.func is sin))):
            return rv
        ia = (1 / rv)
        a = _TR56(ia, sin, cot, (lambda x: (1 + x)), max=max, pow=pow)
        if (a != ia):
            rv = a
        return rv
    return bottom_up(rv, f)