code: def _testSerializeDeserializeNestedBatchHelper(
      self, serialize_fn, deserialize_fn, out_type=dtypes.string
  ):
      with self.cached_session(use_gpu=False) as sess:
          sp_input = self._SparseTensorValue_5x6(np.arange(6))
          serialized = serialize_fn(sp_input, out_type=out_type)
          serialized = array_ops_stack.stack([serialized, serialized])
          serialized = array_ops_stack.stack([serialized, serialized])
  
          sp_deserialized = deserialize_fn(
              serialized, dtype=dtypes.int32
          )
  
          combined_indices, combined_values, combined_shape = sess.run(
              sp_deserialized
          )
  
          # minibatch 0
          self.assertAllEqual(combined_indices[:6, :2], [[0, 0]] * 6)
          self.assertAllEqual(combined_indices[:6, 2:], sp_input[0])
          self.assertAllEqual(combined_values[:6], sp_input[1])
          # minibatch 1
          self.assertAllEqual(combined_indices[6:12, :2], [[0, 1]] * 6)
          self.assertAllEqual(combined_indices[6:12, 2:], sp_input[0])
          self.assertAllEqual(combined_values[6:12], sp_input[1])
          # minibatch 2
          self.assertAllEqual(combined_indices[12:18, :2], [[1, 0]] * 6)
          self.assertAllEqual(combined_indices[12:18, 2:], sp_input[0])
          self.assertAllEqual(combined_values[12:18], sp_input[1])
          # minibatch 3
          self.assertAllEqual(combined_indices[18:, :2], [[1, 1]] * 6)
          self.assertAllEqual(combined_indices[18:, 2:], sp_input[0])
          self.assertAllEqual(combined_values[18:], sp_input[1])
  
          self.assertAllEqual(combined_shape, [2, 2, 5, 6])
  
imports: import numpy
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops import gen_resource_variable_ops
  from tensorflow.python.ops import sparse_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 15 for calling the SerializeSparseTest obj's underlying member method code with example usage: obj._testSerializeDeserializeNestedBatchHelper(serialize_fn, deserialize_fn, out_type) without return types