code: def test_bitwise_not():
      def test_apply(
          func,
          name,
          f_numpy,
          shape,
          dtype="int32",
      ):
          # Build the logic and compile the function
          A = te.placeholder(shape=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 = np.random.uniform(size=shape).astype(A.dtype)
              data_nd = tvm.nd.array(data_npy, dev)
  
              out_npy = f_numpy(data_npy)
              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.bitwise_not, "bitwise_not", np.bitwise_not, ())
      test_apply(
          topi.bitwise_not, "bitwise_not", np.bitwise_not, (2, 1, 2)
      )
  
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 16 for calling a global function with example usage: test_bitwise_not() without return types