class_docstr: Tests input-output pairs for the SpaceToBatchND and BatchToSpaceND ops.
code: def _testDirect(self, input_shape, block_shape, paddings):
      inputs = np.arange(np.prod(input_shape), dtype=np.float32)
      inputs = inputs.reshape(input_shape)
      self._testPad(
          inputs,
          block_shape,
          paddings,
          space_to_batch_direct(inputs, block_shape, paddings),
      )
  
imports: import numpy
  from tensorflow.compiler.tests import xla_test
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gen_array_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 2 for calling the SpaceToBatchNDTest obj's underlying member method code with example usage: obj._testDirect(input_shape, block_shape, paddings) without return types