code: def use(expr, func, level=0, args=(), kwargs={}):
      """
      Use ``func`` to transform ``expr`` at the given level.
  
      Examples
      ========
  
      >>> from sympy import use, expand
      >>> from sympy.abc import x, y
  
      >>> f = (x + y)**2*x + 1
  
      >>> use(f, expand, level=2)
      x*(x**2 + 2*x*y + y**2) + 1
      >>> expand(f)
      x**3 + 2*x**2*y + x*y**2 + 1
  
      """
  
      def _use(expr, level):
          if not level:
              return func(expr, *args, **kwargs)
          else:
              if expr.is_Atom:
                  return expr
              else:
                  level -= 1
                  _args = [_use(arg, level) for arg in expr.args]
                  return expr.__class__(*_args)
  
      return _use(sympify(expr), level)
  
file_path: sympy/sympy/core/traversal.py
imports: from .basic import Basic
  from .sorting import ordered
  from .sympify import sympify
  from sympy.utilities.iterables import iterable
label_desc: Use image node_id 3 for calling a global function with example usage: use(expr, func, level, args, kwargs) and returns: _use, func, expr, expr