code: def _remove_multiple_delta(expr):
      """
      Evaluate products of KroneckerDelta's.
      """
      if expr.is_Add:
          return expr.func(
              *list(map(_remove_multiple_delta, expr.args))
          )
      if not expr.is_Mul:
          return expr
      eqs = []
      newargs = []
      for arg in expr.args:
          if isinstance(arg, KroneckerDelta):
              eqs.append(arg.args[0] - arg.args[1])
          else:
              newargs.append(arg)
      if not eqs:
          return expr
      solns = solve(eqs, dict=True)
      if len(solns) == 0:
          return S.Zero
      elif len(solns) == 1:
          for key in solns[0].keys():
              newargs.append(KroneckerDelta(key, solns[0][key]))
          expr2 = expr.func(*newargs)
          if expr != expr2:
              return _remove_multiple_delta(expr2)
      return expr
  
file_path: sympy/sympy/concrete/delta.py
imports: from .products import product
  from .summations import Sum, summation
  from sympy.core import Add, Mul, S, Dummy
  from sympy.core.cache import cacheit
  from sympy.core.sorting import default_sort_key
  from sympy.functions import KroneckerDelta, Piecewise, piecewise_fold
  from sympy.polys.polytools import factor
  from sympy.sets.sets import Interval
  from sympy.solvers.solvers import solve
label_desc: Use image node_id 5 for calling a global function with example usage: _remove_multiple_delta(expr) and returns: expr, expr, expr, expr, S, _remove_multiple_delta