code: def test_ir_builder_tir_allocate():
      with IRBuilder() as ib:
          with T.allocate([10], "float32", scope="local"):
              T.evaluate(1)
  
      # the allocate generated by IRBuilder
      ir_actual = ib.get()
  
      # the expected allocate
      buffer_var = tir.Var(
          "v", tvm.ir.PointerType(tvm.ir.PrimType("float32"), "local")
      )
      ir_expected = tir.Allocate(
          buffer_var,
          "float32",
          [10],
          tvm.tir.const(1, "uint1"),
          tir.Evaluate(1),
      )
  
      # Check if the generated ir is expected
      assert_structural_equal(
          ir_actual, ir_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 12 for calling a global function with example usage: test_ir_builder_tir_allocate() without return types