code: def test_shape():
      in_shape = (8, 7, 13)
      dtype = "int32"
      A = te.placeholder(shape=in_shape, dtype="float32", name="A")
      B = topi.shape(A, dtype)
  
      input = np.random.uniform(size=in_shape).astype(A.dtype)
      output = np.asarray(in_shape).astype(dtype)
  
      def check_device(target, dev):
          tvm_input = tvm.nd.array(input, dev)
          tvm_output = tvm.nd.empty(
              output.shape, device=dev, dtype=dtype
          )
          print("Running on target: %s" % target)
          with tvm.target.Target(target):
              s = tvm.topi.testing.get_injective_schedule(target)(B)
          f = tvm.build(s, [A, B], target, name="shape")
          f(tvm_input, tvm_output)
          tvm.testing.assert_allclose(tvm_output.numpy(), output)
  
      for backend, dev in tvm.testing.enabled_targets():
          check_device(backend, 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 50 for calling a global function with example usage: test_shape() without return types