

def replace_dummy(expr, sym):
    from sympy import Dummy
    dum = expr.atoms(Dummy)
    if (not dum):
        return expr
    assert (len(expr) == 1)
    return expr.xreplace({
        dum.pop(): sym,
    })

dataset/ETHPy150Open sympy/sympy/sympy/functions/special/tests/test_hyper.py replace_dummy/VarMisuse@42/49 `dum`->`expr`