code: def TR2(rv):
      """Replace tan and cot with sin/cos and cos/sin
  
      Examples
      ========
  
      >>> from sympy.simplify.fu import TR2
      >>> from sympy.abc import x
      >>> from sympy import tan, cot, sin, cos
      >>> TR2(tan(x))
      sin(x)/cos(x)
      >>> TR2(cot(x))
      cos(x)/sin(x)
      >>> TR2(tan(tan(x) - sin(x)/cos(x)))
      0
  
      """
  
      def f(rv):
          if isinstance(rv, tan):
              a = rv.args[0]
              return sin(a) / cos(a)
          elif isinstance(rv, cot):
              a = rv.args[0]
              return cos(a) / sin(a)
          return rv
  
      return bottom_up(rv, f)
  
imports: from collections import defaultdict
  from sympy.core.add import Add
  from sympy.core.expr import Expr
  from sympy.core.exprtools import Factors, gcd_terms, factor_terms
  from sympy.core.function import expand_mul
  from sympy.core.mul import Mul
  from sympy.core.numbers import pi, I
  from sympy.core.power import Pow
  from sympy.core.singleton import S
  from sympy.core.sorting import ordered
  from sympy.core.symbol import Dummy
  from sympy.core.sympify import sympify
  from sympy.core.traversal import bottom_up
  from sympy.functions.combinatorial.factorials import binomial
  from sympy.functions.elementary.hyperbolic import cosh, sinh, tanh, coth, sech, csch, HyperbolicFunction
  from sympy.functions.elementary.trigonometric import cos, sin, tan, cot, sec, csc, sqrt, TrigonometricFunction
  from sympy.ntheory.factor_ import perfect_power
  from sympy.polys.polytools import factor
  from sympy.strategies.tree import greedy
  from sympy.strategies.core import identity, debug
  from sympy import SYMPY_DEBUG
label_desc: Use image node_id 3 for calling a global function with example usage: TR2(rv) and returns: bottom_up, rv, unknown, unknown