code: def verify_stack(shapes, axis):
      tensor_l = []
      for i, shape in enumerate(shapes):
          tensor_l.append(te.placeholder(shape, name="A" + str(i)))
      out_tensor = topi.stack(tensor_l, axis)
  
      def check_device(target, dev):
          print("Running on target: %s" % target)
          with tvm.target.Target(target):
              s = tvm.topi.testing.get_broadcast_schedule(target)(
                  out_tensor
              )
  
          foo = tvm.build(
              s, tensor_l + [out_tensor], target, name="stack"
          )
          data_npys = [
              np.random.normal(size=shape).astype(tensor_l[0].dtype)
              for shape in shapes
          ]
          out_npy = np.stack(data_npys, axis=axis)
          data_nds = [
              tvm.nd.array(data_npy, dev) for data_npy in data_npys
          ]
          out_nd = tvm.nd.empty(
              out_npy.shape, device=dev, dtype=out_tensor.dtype
          )
          foo(*(data_nds + [out_nd]))
          tvm.testing.assert_allclose(out_nd.numpy(), out_npy)
  
      for target, dev in tvm.testing.enabled_targets():
          check_device(target, dev)
  
imports: import numpy
  import pytest
  import tvm
  from tvm import te
  from tvm import topi
  from tvm import relay
  import tvm.topi.testing
  from tvm.contrib.nvcc import have_fp16
  import tvm.testing
label_desc: Use image node_id 7 for calling a global function with example usage: verify_stack(shapes, axis) without return types