code: def test_tensor_scalar():
      # test te with scalar shape
      a = np.array(np.random.uniform(size=(1))[0], "float32")
      b = np.array(0.0, "float32")
  
      @tvm.register_func("tvm.test_tensor_scalar_copy")
      def mycopy(x, y):
          x.copyto(y)
  
      A = te.placeholder(a.shape, name="A")
      B = te.extern(
          a.shape,
          [A],
          lambda ins, outs: tvm.tir.call_packed(
              "tvm.test_tensor_scalar_copy", ins[0], outs[0]
          ),
          name="B",
      )
      s = te.create_schedule(B.op)
      f = tvm.build(s, [A, B], "llvm")
  
      ta = tvm.nd.array(a)
      tb = tvm.nd.array(b)
      f(ta, tb)
      tvm.testing.assert_allclose(ta.numpy(), tb.numpy())
  
imports: import numpy
  import tvm
  import tvm.testing
  from tvm import te
  from tvm.topi.nn.pooling import pool2d
label_desc: Use image node_id 21 for calling a global function with example usage: test_tensor_scalar() without return types