code: def test_deltasummation_mul_add_x_y_add_kd_kd():
      assert ds(
          (x + y) * (KD(i, k) + KD(j, k)), (k, 1, 3)
      ) == piecewise_fold(
          Piecewise((x + y, And(1 <= i, i <= 3)), (0, True))
          + Piecewise((x + y, And(1 <= j, j <= 3)), (0, True))
      )
      assert ds(
          (x + y) * (KD(i, k) + KD(j, k)), (k, 1, 1)
      ) == piecewise_fold(
          Piecewise((x + y, Eq(i, 1)), (0, True))
          + Piecewise((x + y, Eq(j, 1)), (0, True))
      )
      assert ds(
          (x + y) * (KD(i, k) + KD(j, k)), (k, 2, 2)
      ) == piecewise_fold(
          Piecewise((x + y, Eq(i, 2)), (0, True))
          + Piecewise((x + y, Eq(j, 2)), (0, True))
      )
      assert ds(
          (x + y) * (KD(i, k) + KD(j, k)), (k, 3, 3)
      ) == piecewise_fold(
          Piecewise((x + y, Eq(i, 3)), (0, True))
          + Piecewise((x + y, Eq(j, 3)), (0, True))
      )
      assert ds(
          (x + y) * (KD(i, k) + KD(j, k)), (k, 1, l)
      ) == piecewise_fold(
          Piecewise((x + y, And(1 <= i, i <= l)), (0, True))
          + Piecewise((x + y, And(1 <= j, j <= l)), (0, True))
      )
      assert ds(
          (x + y) * (KD(i, k) + KD(j, k)), (k, l, 3)
      ) == piecewise_fold(
          Piecewise((x + y, And(l <= i, i <= 3)), (0, True))
          + Piecewise((x + y, And(l <= j, j <= 3)), (0, True))
      )
      assert ds(
          (x + y) * (KD(i, k) + KD(j, k)), (k, l, m)
      ) == piecewise_fold(
          Piecewise((x + y, And(l <= i, i <= m)), (0, True))
          + Piecewise((x + y, And(l <= j, j <= m)), (0, True))
      )
  
imports: from sympy.concrete import Sum
  from sympy.concrete.delta import deltaproduct, deltasummation, _extract_delta
  from sympy.core import Eq, S, symbols, oo
  from sympy.functions import KroneckerDelta, Piecewise, piecewise_fold
  from sympy.logic import And
  from sympy.testing.pytest import raises
label_desc: Use image node_id 21 for calling a global function with example usage: test_deltasummation_mul_add_x_y_add_kd_kd() without return types