code: def testToBatchedTensorList(self, value_fn, element_0_fn):
      batched_value = value_fn()
      s = structure.type_spec_from_value(batched_value)
      batched_tensor_list = structure.to_batched_tensor_list(
          s, batched_value
      )
  
      # The batch dimension is 2 for all of the test cases.
      # NOTE(mrry): `tf.shape()` does not currently work for the DT_VARIANT
      # tensors in which we store sparse tensors.
      for t in batched_tensor_list:
          if t.dtype != dtypes.variant:
              self.assertEqual(2, self.evaluate(array_ops.shape(t)[0]))
  
      # Test that the 0th element from the unbatched tensor is equal to the
      # expected value.
      expected_element_0 = self.evaluate(element_0_fn())
      unbatched_s = nest.map_structure(
          lambda component_spec: component_spec._unbatch(), s
      )
      actual_element_0 = structure.from_tensor_list(
          unbatched_s, [t[0] for t in batched_tensor_list]
      )
  
      for expected, actual in zip(
          nest.flatten(expected_element_0),
          nest.flatten(actual_element_0),
      ):
          self.assertValuesEqual(expected, actual)
  
imports: import collections
  import dataclasses
  import functools
  from absl.testing import parameterized
  import numpy
  import wrapt
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.util import nest
  from tensorflow.python.data.util import structure
  from tensorflow.python.framework import combinations
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import tensor_array_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.ops.ragged import ragged_factory_ops
  from tensorflow.python.ops.ragged import ragged_tensor
  from tensorflow.python.ops.ragged import ragged_tensor_value
  from tensorflow.python.platform import test
  from tensorflow.python.util.compat import collections_abc
label_desc: Use image node_id 17 for calling the StructureTest obj's underlying member method code with example usage: obj.testToBatchedTensorList(value_fn, element_0_fn) without return types