code: def notempty(brule):
      def notempty_brl(expr):
          yielded = False
          for nexpr in brule(expr):
              yielded = True
              yield nexpr
          if not yielded:
              yield expr
  
      return notempty_brl
  
file_path: sympy/sympy/strategies/branch/core.py
label_desc: Use image node_id 8 for calling a global function with example usage: notempty(brule) and returns: notempty_brl