class_docstr: Tests input-output pairs for the SpaceToBatch and BatchToSpace ops.
code: def _testPad(self, inputs, paddings, block_size, outputs):
      with self.session() as sess, self.test_scope():
          for dtype in self.float_types:
              # outputs = space_to_batch(inputs)
              placeholder = array_ops.placeholder(dtype)
              x_tf = gen_array_ops.space_to_batch(
                  placeholder, paddings, block_size=block_size
              )
              self.assertAllEqual(
                  sess.run(x_tf, {placeholder: inputs}), outputs
              )
              # inputs = batch_to_space(outputs)
              x_tf = gen_array_ops.batch_to_space(
                  placeholder, paddings, block_size=block_size
              )
              self.assertAllEqual(
                  sess.run(x_tf, {placeholder: outputs}), inputs
              )
  
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 1 for calling the SpaceToBatchTest obj's underlying member method code with example usage: obj._testPad(inputs, paddings, block_size, outputs) without return types