code: def test_region_lower_bound_for_non_perfect_tile():
      h1 = tvm.tir.Var("h1", "int32")
      h2 = tvm.tir.Var("h2", "int32")
      h3 = tvm.tir.Var("h3", "int32")
  
      # non-uniform tiling, single inner variable
      var_dom = {
          h2: tvm.ir.Range(begin=0, end=10),
      }
      check_region_bound(
          {
              h3 * 8
              + h2: {
                  (): (
                      tvm.tir.max(h3 * 8, 1),
                      tvm.tir.min(0, h3 * 8 - 214) + 224,
                  ),
                  ((h3, 0),): (1, 10),  # h3 == 0: region is [1, 10)
                  ((h3, 10),): (
                      h3 * 8,
                      h3 * 8 + 10,
                  ),  # 0 < h3 <= 26: region is [h3 * 8, h3 * 8 + 10)
                  ((h3, 27),): (
                      h3 * 8,
                      224,
                  ),  # h3 > 26: region is [h3 * 8, 224)
              }
          },
          var_dom,
          predicate=tvm.tir.all(1 <= h3 * 8 + h2, h3 * 8 + h2 < 224),
          mode="lowerbound",
      )
  
      # non-uniform tiling, two inner variables
      var_dom = {
          h1: tvm.ir.Range(begin=0, end=5),
          h2: tvm.ir.Range(begin=0, end=2),
      }
      check_region_bound(
          {
              h3 * 8
              + h2 * 5
              + h1: {
                  (): (
                      tvm.tir.max(h3 * 8, 1),
                      tvm.tir.min(0, h3 * 8 - 214) + 224,
                  ),
                  ((h3, 0),): (1, 10),
                  ((h3, 10),): (h3 * 8, h3 * 8 + 10),
                  ((h3, 27),): (h3 * 8, 224),
              }
          },
          var_dom,
          predicate=tvm.tir.all(
              1 <= h3 * 8 + h2 * 5 + h1, h3 * 8 + h2 * 5 + h1 < 224
          ),
          mode="lowerbound",
      )
  
      # lowerbound should fail on incompatible predicates
      check_region_bound(
          {h3 * 8 + h2 * 5 + h1: None},
          var_dom,
          predicate=tvm.tir.all(
              1 <= h3 * 8 + h2 * 5 + h1, h3 * 8 + h1 * 2 + h2 < 224
          ),
          mode="lowerbound",
      )
      check_region_bound(
          {h3 * 8 + h2 * 5 + h1: (h3 * 8, h3 * 8 + 10)},
          var_dom,
          predicate=tvm.tir.all(
              1 <= h3 * 8 + h2 * 5 + h1, h3 * 8 + h1 * 2 + h2 < 224
          ),
          mode="upperbound",
      )
  
imports: import tvm
  import tvm.testing
  from tvm import te
  from tvm import tir
  from tvm.arith.analyzer import Analyzer
label_desc: Use image node_id 15 for calling a global function with example usage: test_region_lower_bound_for_non_perfect_tile() without return types