(expr, index)
return False
Returns True if ``expr`` is an expression that contains a KroneckerDelta
    that is simple in the index ``index``, meaning that this KroneckerDelta
    is nonzero for a single value of the index ``index``.
Returns True if ``expr`` is an expression that contains a KroneckerDelta
    that is simple in the index ``index``, meaning that this KroneckerDelta
    is nonzero for a single value of the index ``index``.
Returns True if expr is an expression that contains a KroneckerDelta that is simple in the index index meaning that this KroneckerDelta is nonzero for a single value of the index index .
def _has_simple_delta(expr, index):
    """
    Returns True if ``expr`` is an expression that contains a KroneckerDelta
    that is simple in the index ``index``, meaning that this KroneckerDelta
    is nonzero for a single value of the index ``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
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