code: def test_as_dummy():
      u, v, x, y, z, _0, _1 = symbols("u v x y z _0 _1")
      assert Lambda(x, x + 1).as_dummy() == Lambda(_0, _0 + 1)
      assert Lambda(x, x + _0).as_dummy() == Lambda(_1, _0 + _1)
      eq = 1 + Sum(x, (x, 1, x))
      ans = 1 + Sum(_0, (_0, 1, x))
      once = eq.as_dummy()
      assert once == ans
      twice = once.as_dummy()
      assert twice == ans
      assert Integral(
          x + _0, (x, x + 1), (_0, 1, 2)
      ).as_dummy() == Integral(_0 + _1, (_0, x + 1), (_1, 1, 2))
      for T in (Symbol, Dummy):
          d = T("x", real=True)
          D = d.as_dummy()
          assert D != d and D.func == Dummy and D.is_real is None
      assert Dummy().as_dummy().is_commutative
      assert Dummy(commutative=False).as_dummy().is_commutative is False
  
imports: import collections
  from typing import TypeVar, Generic
  from sympy.assumptions.ask import Q
  from sympy.core.basic import Basic, Atom, as_Basic, _atomic, _aresame
  from sympy.core.containers import Tuple
  from sympy.core.function import Function, Lambda
  from sympy.core.numbers import I, pi, Float
  from sympy.core.singleton import S
  from sympy.core.symbol import symbols, Symbol, Dummy
  from sympy.concrete.summations import Sum
  from sympy.functions.elementary.trigonometric import cos, sin
  from sympy.functions.special.gamma_functions import gamma
  from sympy.integrals.integrals import Integral
  from sympy.functions.elementary.exponential import exp
  from sympy.testing.pytest import raises, warns_deprecated_sympy
label_desc: Use image node_id 20 for calling a global function with example usage: test_as_dummy() without return types