code: def test_ir_builder_tir_block_complete():
      with IRBuilder() as ib:
          a = T.int64()
          b = T.Buffer((128, 128), "float32")
          c = T.Buffer((128, 128), "float32")
          d = T.int32()
          e = T.Buffer((128, 128), "float32")
          f = T.int32()
          with T.block("block"):
              T.where(a > 1)
              T.reads(b[0:16, 0:16])
              T.writes(c[d:128, d:128])
              T.block_attr({"key": "value"})
              T.alloc_buffer((128, 128), "float32")
              T.match_buffer(e[0:32, 0:32], (32, 32), "float32")
              T.axis.spatial(128, f)
              T.evaluate(0)
  
      # the block generated by IRBuilder
      block_realize_actual = ib.get()
  
      # the expected block
      var_a = tir.Var("a", "int64")
      buffer_b = tir.decl_buffer((128, 128), "float32", name="b")
      buffer_c = tir.decl_buffer((128, 128), "float32", name="c")
      var_d = tir.Var("d", "int32")
      buffer_e = tir.decl_buffer((128, 128), "float32", name="c")
      var_f = tir.Var("f", "int32")
      block_expected = tir.Block(
          iter_vars=[
              tir.IterVar(
                  (0, 128),
                  tir.Var("", "int32"),
                  iter_type=tir.IterVar.DataPar,
              )
          ],
          reads=[buffer_b[0:16, 0:16]],
          writes=[buffer_c[var_d:128, var_d:128]],
          name_hint="block",
          body=tir.Evaluate(0),
          alloc_buffers=[tir.decl_buffer((128, 128), "float32")],
          match_buffers=[
              tir.MatchBufferRegion(
                  tir.decl_buffer((32, 32), "float32"),
                  buffer_e[0:32, 0:32],
              )
          ],
          annotations={"key": "value"},
      )
      block_realize_expected = tir.BlockRealize(
          iter_values=[var_f],
          predicate=var_a > 1,
          block=block_expected,
      )
  
      # Check if the generated ir is expected
      assert_structural_equal(
          block_realize_actual,
          block_realize_expected,
          map_free_vars=True,
      )
  
imports: import numpy
  import pytest
  import tvm
  import tvm.testing
  from tvm import tir
  from tvm.ir.base import assert_structural_equal
  from tvm.runtime import ndarray
  from tvm.script.ir_builder import IRBuilder
  from tvm.script.ir_builder import tir
label_desc: Use image node_id 4 for calling a global function with example usage: test_ir_builder_tir_block_complete() without return types