code: def walk(e, *target):
      """Iterate through the args that are the given types (target) and
      return a list of the args that were traversed; arguments
      that are not of the specified types are not traversed.
  
      Examples
      ========
  
      >>> from sympy.core.traversal import walk
      >>> from sympy import Min, Max
      >>> from sympy.abc import x, y, z
      >>> list(walk(Min(x, Max(y, Min(1, z))), Min))
      [Min(x, Max(y, Min(1, z)))]
      >>> list(walk(Min(x, Max(y, Min(1, z))), Min, Max))
      [Min(x, Max(y, Min(1, z))), Max(y, Min(1, z)), Min(1, z)]
  
      See Also
      ========
  
      bottom_up
      """
      if isinstance(e, target):
          yield e
          for i in e.args:
              yield from walk(i, *target)
  
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 4 for calling a global function with example usage: walk(e) without return types