code: def testToList(self):
      with context.eager_mode():
          tensor_values = constant_op.constant(
              ["a", "b", "c", "d", "e", "f", "g", "h"]
          )
          row_splits = constant_op.constant(
              [0, 2, 2, 5, 6, 8], dtypes.int64
          )
          values = WrappedTensor(tensor_values)
          rt = RaggedTensor.from_row_splits(values, row_splits)
          expected = ragged_factory_ops.constant(
              [["a", "b"], [], ["c", "d", "e"], ["f"], ["g", "h"]]
          ).to_list()
  
          with self.subTest("Raise on unsupported"):
              with self.assertRaisesRegex(
                  ValueError,
                  "values must be convertible to a list",
              ):
                  _ = rt.to_list()
  
          with self.subTest("Value with numpy method"):
  
              class WrappedTensorWithNumpy(WrappedTensor):
                  def numpy(self):
                      return self.value.numpy()
  
              values = WrappedTensorWithNumpy(tensor_values)
              rt = RaggedTensor.from_row_splits(values, row_splits)
              self.assertEqual(rt.to_list(), expected)
  
          with self.subTest("Value with to_list method"):
  
              class WrappedTensorWithToList(WrappedTensor):
                  def to_list(self):
                      return self.value.numpy().tolist()
  
              values = WrappedTensorWithToList(tensor_values)
              rt = RaggedTensor.from_row_splits(values, row_splits)
              self.assertEqual(rt.to_list(), expected)
  
imports: from absl.testing import parameterized
  from tensorflow.python.eager import context
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import extension_type
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import test_util
  from tensorflow.python.framework import type_spec
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import check_ops
  from tensorflow.python.ops import clip_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nn_ops
  from tensorflow.python.ops import string_ops
  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_test_ops
  from tensorflow.python.ops.ragged.ragged_tensor import RaggedTensor
  from tensorflow.python.ops.ragged.ragged_tensor import RaggedTensorSpec
  from tensorflow.python.platform import googletest
  from tensorflow.python.util import dispatch
label_desc: Use image node_id 7 for calling the RaggedTensorSpecSupportedValuesTest obj's underlying member method code with example usage: obj.testToList() and returns: self, self