'Replace instances of the given dummy variables with explicit dummy
counterparts to make clear what are dummy variables and what
are real-world symbols in an object.
Examples
>>> from sympy import Integral
>>> from sympy.abc import x, y
>>> Integral(x, (x, x, y), (y, x, y)).as_dummy()
Integral(_x, (_x, x, _y), (_y, x, y))
If the object supperts the "integral at" limit ``(x,)`` it
is not treated as a dummy, but the explicit form, ``(x, x)``
of length 2 does treat the variable as a dummy.
>>> Integral(x, x).as_dummy()
Integral(x, x)
>>> Integral(x, (x, x)).as_dummy()
Integral(_x, (_x, x))
If there were no dummies in the original expression, then the
the symbols which cannot be changed by subs() are clearly seen as
those with an underscore prefix.
See Also
variables : Lists the integration variables
transform : Perform mapping on the integration variable'

def as_dummy(self):

    reps = {}
    f = self.function
    limits = list(self.limits)
    for i in range((-1), ((- len(limits)) - 1), (-1)):
        xab = list(limits[i])
        if (len(xab) == 1):
            continue
        x = xab[0]
        xab[0] = x.as_dummy()
        for j in range(1, len(xab)):
            xab[j] = xab[j].subs(reps)
        reps[x] = xab[0]
        limits[i] = xab
    f = f.subs(reps)
    return self.func(f, *limits)
