code: def condition(cond, brule):
      """Only apply branching rule if condition is true"""
  
      def conditioned_brl(expr):
          if cond(expr):
              yield from brule(expr)
          else:
              pass
  
      return conditioned_brl
  
file_path: sympy/sympy/strategies/branch/core.py
label_desc: Use image node_id 6 for calling a global function with example usage: condition(cond, brule) and returns: conditioned_brl