code: def test_overlapped_fuse():
      x = tvm.tir.Var("x", "int32")
      y = tvm.tir.Var("y", "int32")
      z = tvm.tir.Var("z", "int32")
      a = tvm.tir.Var("x", "int32")
      b = tvm.tir.Var("y", "int32")
  
      # non-bijective fuse of two
      assert_iter_sum_pattern(
          {
              x * 7 + y: (22, 0, 1),
          },
          var_dom([(x, 3), (y, 8)]),
          check_level="surjective",
      )
      assert_iter_sum_failure(
          [x * 7 + y],
          var_dom([(x, 3), (y, 8)]),
          check_level="bijective",
      )
  
      # non-bijective fuse of three
      assert_iter_sum_pattern(
          {
              x * 18 + y * 7 + z: (40, 0, 1),
          },
          var_dom([(x, 2), (y, 3), (z, 8)]),
          check_level="surjective",
      )
      assert_iter_sum_failure(
          [x * 7 + y],
          var_dom([(x, 2), (y, 3), (z, 8)]),
          check_level="bijective",
      )
  
      # negative scale fusion is not allowed
      assert_iter_sum_failure(
          [x * -7 + y],
          var_dom([(x, 3), (y, 8)]),
          check_level="surjective",
      )
      assert_iter_sum_failure(
          [x * 7 - y],
          var_dom([(x, 3), (y, 8)]),
          check_level="surjective",
      )
  
      # with predicate
      assert_iter_sum_pattern(
          {
              a * 40 + b * 20 + x * 18 + y * 3 + z: (125, 6, 1),
          },
          var_dom([(a, 3), (b, 2), (x, 2), (y, 6), (z, 8)]),
          predicate=tvm.tir.all(z < 4, 1 < x * 6 + y, x * 6 + y < 10),
          check_level="surjective",
      )
  
      # stride=1 kernel
      assert_iter_sum_pattern(
          {x + a: (230, 0, 1)},
          var_dom([(x, 224), (a, 7)]),
          check_level="surjective",
      )
  
      # do not allow both strided and overlapped
      assert_iter_sum_failure(
          [5 * x + 2 * y],
          var_dom([(x, 4), (y, 3)]),
          check_level="surjective",
      )
  
imports: import tvm
  import tvm.testing
  from tvm.tir import floordiv, floormod
label_desc: Use image node_id 23 for calling a global function with example usage: test_overlapped_fuse() without return types