code: def test_tensor_array_stack():
      def run(dtype):
          mod = tvm.IRModule()
          p = Prelude(mod)
          tensor_t = p.get_type("tensor_t", dtype)
          rlist = p.mod.get_global_type_var(f"List")
          tensor_array = p.get_global_var("tensor_array", dtype)
          tensor1 = p.get_tensor_ctor("tensor1", dtype)
          write = p.get_global_var("tensor_array_write", dtype)
          stack = p.get_global_var("tensor_array_stack", dtype)
          # TODO extract test case from inference failures
          # setting this wrong causes crashes
          v = relay.var("v", shape=(1,), dtype=dtype)
          init_tensor_array = tensor_array(relay.const(3))
          tensor_array1 = write(
              init_tensor_array, relay.const(0), tensor1(v)
          )
          tensor_array2 = write(
              tensor_array1, relay.const(1), tensor1(v)
          )
          tensor_array3 = write(
              tensor_array2, relay.const(2), tensor1(v)
          )
          tensor_array4 = stack(tensor_array3)
          mod["main"] = relay.Function([v], tensor_array4, tensor_t())
          t = np.random.uniform(low=0.0, high=8.0, size=(1,)).astype(
              dtype
          )
          expected = [np.stack([t, t, t])]
          check_tensor_array(mod, expected, t, dtype=dtype)
  
      run("float32")
      run("int32")
  
imports: import pytest
  import tvm
  from tvm import relay
  from tvm.relay import testing
  from tvm.relay.backend.interpreter import ConstructorValue
  from tvm.relay import create_executor
  from tvm.relay.prelude import Prelude, StaticTensorArrayOps
  from tvm.relay.testing import count, make_nat_value, make_nat_expr
  import numpy
label_desc: Use image node_id 7 for calling a global function with example usage: test_tensor_array_stack() without return types