docstr: Test a dataset that represents the slices from a tuple of tensors.
docstr_tok: ["Test","a","dataset","that","represents","the","slices","from","a","tuple","of","tensors","."]
code: def testFromTensorSlicesSparse(self):
      """Test a dataset that represents the slices from a tuple of tensors."""
      components = (
          sparse_tensor.SparseTensorValue(
              indices=np.array([[0, 0], [1, 0], [2, 0]]),
              values=np.array([0, 0, 0]),
              dense_shape=np.array([3, 1]),
          ),
          sparse_tensor.SparseTensorValue(
              indices=np.array([[0, 0], [1, 1], [2, 2]]),
              values=np.array([1, 2, 3]),
              dense_shape=np.array([3, 3]),
          ),
      )
  
      dataset = dataset_ops.Dataset.from_tensor_slices(components)
  
      self.assertEqual(
          [
              tensor_shape.TensorShape(c.dense_shape[1:])
              for c in components
          ],
          [
              shape
              for shape in dataset_ops.get_legacy_output_shapes(dataset)
          ],
      )
  
      expected = [
          (
              sparse_tensor.SparseTensorValue(
                  indices=np.array([[0]]),
                  values=np.array([0]),
                  dense_shape=np.array([1]),
              ),
              sparse_tensor.SparseTensorValue(
                  indices=np.array([[0]]),
                  values=np.array([1]),
                  dense_shape=np.array([3]),
              ),
          ),
          (
              sparse_tensor.SparseTensorValue(
                  indices=np.array([[0]]),
                  values=np.array([0]),
                  dense_shape=np.array([1]),
              ),
              sparse_tensor.SparseTensorValue(
                  indices=np.array([[1]]),
                  values=np.array([2]),
                  dense_shape=np.array([3]),
              ),
          ),
          (
              sparse_tensor.SparseTensorValue(
                  indices=np.array([[0]]),
                  values=np.array([0]),
                  dense_shape=np.array([1]),
              ),
              sparse_tensor.SparseTensorValue(
                  indices=np.array([[2]]),
                  values=np.array([3]),
                  dense_shape=np.array([3]),
              ),
          ),
      ]
      self.assertDatasetProduces(dataset, expected_output=expected)
  
imports: import collections
  from absl.testing import parameterized
  import numpy
  from tensorflow.python.data.experimental.ops import random_access
  from tensorflow.python.data.kernel_tests import checkpoint_test_base
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.ops import options
  from tensorflow.python.framework import combinations
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.ops.ragged import ragged_factory_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 6 for calling the FromTensorSlicesTest obj's underlying member method code with example usage: obj.testFromTensorSlicesSparse() without return types