def _mytype(f, x):
    if x not in f.free_symbols:
        return ()
    elif f.is_Function:
        return (type(f),)
    else:
        types = [_mytype(a, x) for a in f.args]
        res = []
        for t in types:
            res += list(t)
        res.sort()
        return tuple(res)
Create a hashable entity describing the type of f.
dataset/ETHPy150Open sympy/sympy/sympy/integrals/meijerint.py/_mytype