code: def chain(*brules):
      """
      Compose a sequence of brules so that they apply to the expr sequentially
      """
  
      def chain_brl(expr):
          if not brules:
              yield expr
              return
  
          head, tail = brules[0], brules[1:]
          for nexpr in head(expr):
              yield from chain(*tail)(nexpr)
  
      return chain_brl
  
file_path: sympy/sympy/strategies/branch/core.py
label_desc: Use image node_id 10 for calling a global function with example usage: chain() and returns: chain_brl