@cacheit
def _has_simple_delta(expr, index):
    if expr.has(KroneckerDelta):
        if _is_simple_delta(expr, index):
            return True
        if expr.is_Add or expr.is_Mul:
            for arg in expr.args:
                if _has_simple_delta(arg, index):
                    return True
    return False
Returns True if ``expr`` is an expression that contains a KroneckerDelta
dataset/ETHPy150Open sympy/sympy/sympy/concrete/delta.py/_has_simple_delta