code: def TR10(rv, first=True):
      """Separate sums in ``cos`` and ``sin``.
  
      Examples
      ========
  
      >>> from sympy.simplify.fu import TR10
      >>> from sympy.abc import a, b, c
      >>> from sympy import cos, sin
      >>> TR10(cos(a + b))
      -sin(a)*sin(b) + cos(a)*cos(b)
      >>> TR10(sin(a + b))
      sin(a)*cos(b) + sin(b)*cos(a)
      >>> TR10(sin(a + b + c))
      (-sin(a)*sin(b) + cos(a)*cos(b))*sin(c) + \
      (sin(a)*cos(b) + sin(b)*cos(a))*cos(c)
      """
  
      def f(rv):
          if rv.func not in (cos, sin):
              return rv
  
          f = rv.func
          arg = rv.args[0]
          if arg.is_Add:
              if first:
                  args = list(ordered(arg.args))
              else:
                  args = list(arg.args)
              a = args.pop()
              b = Add._from_args(args)
              if b.is_Add:
                  if f == sin:
                      return sin(a) * TR10(cos(b), first=False) + cos(
                          a
                      ) * TR10(sin(b), first=False)
                  else:
                      return cos(a) * TR10(cos(b), first=False) - sin(
                          a
                      ) * TR10(sin(b), first=False)
              else:
                  if f == sin:
                      return sin(a) * cos(b) + cos(a) * sin(b)
                  else:
                      return cos(a) * cos(b) - sin(a) * sin(b)
          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 13 for calling a global function with example usage: TR10(rv, first) and returns: bottom_up, rv, rv, unknown, unknown, unknown, unknown