code: def test_use():
      x, y = symbols("x y")
  
      assert use(0, expand) == 0
  
      f = (x + y) ** 2 * x + 1
  
      assert (
          use(f, expand, level=0)
          == x**3 + 2 * x**2 * y + x * y**2 + +1
      )
      assert (
          use(f, expand, level=1)
          == x**3 + 2 * x**2 * y + x * y**2 + +1
      )
      assert use(f, expand, level=2) == 1 + x * (
          2 * x * y + x**2 + y**2
      )
      assert use(f, expand, level=3) == (x + y) ** 2 * x + 1
  
      f = (x**2 + 1) ** 2 - 1
      kwargs = {"gaussian": True}
  
      assert use(f, factor, level=0, kwargs=kwargs) == x**2 * (
          x**2 + 2
      )
      assert (
          use(f, factor, level=1, kwargs=kwargs)
          == (x + I) ** 2 * (x - I) ** 2 - 1
      )
      assert (
          use(f, factor, level=2, kwargs=kwargs)
          == (x + I) ** 2 * (x - I) ** 2 - 1
      )
      assert (
          use(f, factor, level=3, kwargs=kwargs)
          == (x**2 + 1) ** 2 - 1
      )
  
file_path: sympy/sympy/core/tests/test_traversal.py
imports: from sympy.core.basic import Basic
  from sympy.core.containers import Tuple
  from sympy.core.sorting import default_sort_key
  from sympy.core.symbol import symbols
  from sympy.core.singleton import S
  from sympy.core.function import expand, Function
  from sympy.core.numbers import I
  from sympy.integrals.integrals import Integral
  from sympy.polys.polytools import factor
  from sympy.core.traversal import preorder_traversal, use, postorder_traversal, iterargs, iterfreeargs
  from sympy.functions.elementary.piecewise import ExprCondPair, Piecewise
  from sympy.testing.pytest import warns_deprecated_sympy
  from sympy.utilities.iterables import capture
label_desc: Use image node_id 2 for calling a global function with example usage: test_use() without return types