code: def test_access_of_padding_pattern():
      s = tvm.tir.schedule.Schedule(access_of_padding_pattern)
      alloc_buffers = s.get_sref(s.get_block("root")).stmt.alloc_buffers
      buffer_var_map = {buf.data: buf for buf in alloc_buffers}
  
      def do_compare_buffer_region(region, expect):
          assert region.buffer == expect.buffer
          analyzer = tvm.arith.Analyzer()
          for observed_range, expected_range in zip(
              region.region, expect.region
          ):
              analyzer.can_prove_equal(
                  observed_range.min, expected_range.min
              )
              analyzer.can_prove_equal(
                  observed_range.extent, expected_range.extent
              )
  
      def do_check_block(block_name):
          block = s.get_sref(s.get_block(block_name)).stmt
          expect_reads = block.reads
          expect_writes = block.writes
          ret = tir.analysis.get_block_access_region(
              block, buffer_var_map
          )
          for i, read in enumerate(ret[0]):
              do_compare_buffer_region(read, expect_reads[i])
          for i, write in enumerate(ret[1]):
              do_compare_buffer_region(write, expect_writes[i])
  
      do_check_block("padding")
      do_check_block("padding_reverse")
  
imports: import pytest
  import tvm
  from tvm import tir
  from tvm.script import tir
  from tvm.ir import Range
label_desc: Use image node_id 18 for calling a global function with example usage: test_access_of_padding_pattern() without return types