docstr: Test that rt.__getitem__(slice_spec) == expected.
docstr_tok: ["Test","that","rt.__getitem__","(","slice_spec",")","==","expected","."]
code: def testWithUniformRowLength(
      self, slice_spec, expected, expected_shape
  ):
      """Test that rt.__getitem__(slice_spec) == expected."""
      rt = RaggedTensor.from_uniform_row_length(
          RaggedTensor.from_row_splits(
              EXAMPLE_RAGGED_TENSOR_3D_VALUES,
              EXAMPLE_RAGGED_TENSOR_3D_SPLITS,
          ),
          EXAMPLE_RAGGED_TENSOR_3D_ROWLEN,
      )
      self.assertAllEqual(rt, EXAMPLE_RAGGED_TENSOR_3D)
      self.assertIsNot(rt.uniform_row_length, None)
      self._TestGetItem(rt, slice_spec, expected, expected_shape)
  
      # If the result is 3D, then check that it still has a uniform row length:
      actual = rt.__getitem__(
          slice_spec
      )  # pylint: disable=assignment-from-no-return
      if actual.shape.rank == 3:
          self.assertIsNot(actual.uniform_row_length, None)
          self.assertAllEqual(
              actual.uniform_row_length, expected_shape[1]
          )
  
imports: import re
  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 errors
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import tensor_getitem_override
  from tensorflow.python.ops.ragged import ragged_factory_ops
  from tensorflow.python.ops.ragged.ragged_tensor import RaggedTensor
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 13 for calling the RaggedGetItemTest obj's underlying member method code with example usage: obj.testWithUniformRowLength(slice_spec, expected, expected_shape) without return types