code: def test_batch_to_space_nd(executor_kind):
      def verify_batch_to_space_nd(dshape, block_shape, crops):
          x_data = np.random.uniform(size=dshape).astype("float32")
          crop_begin_list, crop_end_list = map(list, zip(*crops))
          ref_res = tvm.topi.testing.batch_to_space_nd_python(
              x_data, block_shape, crop_begin_list, crop_end_list
          )
  
          x = relay.var("x", relay.TensorType(dshape, "float32"))
          z = relay.nn.batch_to_space_nd(x, block_shape, crops)
          assert "block_shape=" in z.astext()
          assert "crops=" in z.astext()
          zz = run_infer_type(z)
          assert zz.checked_type == relay.TensorType(
              ref_res.shape, "float32"
          )
          func = relay.Function([x], z)
  
          for target, dev in tvm.testing.enabled_targets():
              op_res = relay.create_executor(
                  executor_kind, device=dev, target=target
              ).evaluate(func)(x_data)
              tvm.testing.assert_allclose(
                  op_res.numpy(), ref_res, rtol=1e-4
              )
  
      verify_batch_to_space_nd([4, 1, 1, 3], [2, 2], [[0, 0], [0, 0]])
      verify_batch_to_space_nd([8, 1, 3, 1], [2, 2], [[0, 0], [2, 0]])
  
imports: import math
  import platform
  import sys
  import numpy
  import pytest
  import tvm
  import tvm.testing
  import tvm.topi.testing
  from tvm import relay, te
  from tvm.relay.testing import run_infer_type
label_desc: Use image node_id 19 for calling a global function with example usage: test_batch_to_space_nd(executor_kind) without return types