code: def test_bound_simplification_failure():
      # Check that the bounds are not expanded
      A = te.compute((2,), lambda j: j, "A")
  
      def _check(B, A=A):
          s = te.create_schedule(B.op)
          s = s.normalize()
          bounds = tvm.te.schedule.InferBound(s)
          stmt = tvm.lower(s, [B, A], simple_mode=True)
          if not bounds[A.op.axis[0]].extent.value <= 2:
              print(stmt)
              assert bounds[A.op.axis[0]].extent.value <= 2
  
      tdiv = tvm.tir.truncdiv
      # These are hard to simplify, moreover we don't simplify them
      _check(
          te.compute(
              (10,),
              lambda i: A[
                  tvm.te.min(3 * i, 4 * i) + tvm.te.min(-3 * i, -2 * i)
              ],
          )
      )
      _check(
          te.compute(
              (10,),
              lambda i: A[
                  tvm.te.min(3 * i, 4 * i) + tvm.te.max(-3 * i, -4 * i)
              ],
          )
      )
      _check(
          te.compute(
              (10,), lambda i: A[-2 * tdiv(i, 2) - tvm.te.min(i, 0 - i)]
          )
      )
      _check(te.compute((10,), lambda i: A[i + (0 - i)]))
      # This would cause out of bounds, but we nevertheless include it
      _check(te.compute((10,), lambda i: A[i]))
  
imports: import tvm
  import tvm.testing
  from tvm import te
label_desc: Use image node_id 20 for calling a global function with example usage: test_bound_simplification_failure() without return types