code: def _checkGrad(self, x, block_shape, crops, crops_dtype):
      block_shape = np.array(block_shape)
      crops = constant_op.constant(
          np.array(crops).reshape((len(block_shape), 2)), crops_dtype
      )
      with self.cached_session():
          tf_x = ops.convert_to_tensor(x)
          tf_y = array_ops.batch_to_space_nd(tf_x, block_shape, crops)
          epsilon = 1e-5
          ((x_jacob_t, x_jacob_n)) = gradient_checker.compute_gradient(
              tf_x,
              x.shape,
              tf_y,
              tf_y.get_shape().as_list(),
              x_init_value=x,
              delta=epsilon,
          )
  
      self.assertAllClose(x_jacob_t, x_jacob_n, rtol=1e-2, atol=epsilon)
  
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gen_array_ops
  from tensorflow.python.ops import gradient_checker
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the BatchToSpaceNDGradientTest obj's underlying member method code with example usage: obj._checkGrad(x, block_shape, crops, crops_dtype) without return types