code: def test_karr_proposition_2a():
      # Test Karr, page 309, proposition 2, part a
      i, u, v = symbols("i u v", integer=True)
  
      def test_the_product(m, n):
          # g
          g = i**3 + 2 * i**2 - 3 * i
          # f = Delta g
          f = simplify(g.subs(i, i + 1) / g)
          # The product
          a = m
          b = n - 1
          P = Product(f, (i, a, b)).doit()
          # Test if Product_{m <= i < n} f(i) = g(n) / g(m)
          assert combsimp(P / (g.subs(i, n) / g.subs(i, m))) == 1
  
      # m < n
      test_the_product(u, u + v)
      # m = n
      test_the_product(u, u)
      # m > n
      test_the_product(u + v, u)
  
imports: from sympy.concrete.products import Product, product
  from sympy.concrete.summations import Sum
  from sympy.core.function import Derivative, Function, diff
  from sympy.core.numbers import Rational, oo, pi
  from sympy.core.singleton import S
  from sympy.core.symbol import Dummy, Symbol, symbols
  from sympy.functions.combinatorial.factorials import rf, factorial
  from sympy.functions.elementary.exponential import exp, log
  from sympy.functions.elementary.miscellaneous import sqrt
  from sympy.functions.elementary.trigonometric import cos, sin
  from sympy.functions.special.tensor_functions import KroneckerDelta
  from sympy.simplify.combsimp import combsimp
  from sympy.simplify.simplify import simplify
  from sympy.testing.pytest import raises
label_desc: Use image node_id 2 for calling a global function with example usage: test_karr_proposition_2a() without return types