def hypersimilar(f, g, k):
    f, g = list(map(sympify, (f, g)))

    h = (f/g).rewrite(gamma)
    h = h.expand(func=True, basic=False)

    return h.is_rational_function(k)
Returns True if 'f' and 'g' are hyper-similar.
dataset/ETHPy150Open sympy/sympy/sympy/simplify/simplify.py/hypersimilar