code: def test_logical_single_ele():
      def test_apply(
          func,
          name,
          f_numpy,
          indata,
          dtype="bool",
      ):
          # Build the logic and compile the function
          A = te.placeholder(shape=indata.shape, name="A", dtype=dtype)
          B = func(A)
          if isinstance(A, tvm.tir.PrimExpr):
              assert isinstance(B, tvm.tir.PrimExpr)
              return
  
          def check_target(target, dev):
              print("Running on target: %s" % target)
              with tvm.target.Target(target):
                  s = tvm.topi.testing.get_broadcast_schedule(target)(B)
              foo = tvm.build(s, [A, B], target, name=name)
  
              data_npy = indata.astype(A.dtype)
              data_nd = tvm.nd.array(data_npy, dev)
  
              out_npy = f_numpy(indata)
              out_nd = tvm.nd.array(
                  np.empty(data_npy.shape).astype(B.dtype), dev
              )
              foo(data_nd, out_nd)
              tvm.testing.assert_allclose(out_nd.numpy(), out_npy)
  
          for target, dev in tvm.testing.enabled_targets():
              check_target(target, dev)
  
      test_apply(
          topi.logical_not,
          "logical_not",
          np.logical_not,
          np.array([True, False, 0, 1]),
      )
      test_apply(
          topi.logical_not,
          "logical_not",
          np.logical_not,
          np.array(np.arange(5) < 3),
      )
  
imports: import numpy
  import tvm
  from tvm import te
  from tvm import topi
  import tvm.testing
  import tvm.topi.testing
label_desc: Use image node_id 15 for calling a global function with example usage: test_logical_single_ele() without return types