docstr: Test a dataset that represents a single tuple of tensors.
docstr_tok: ["Test","a","dataset","that","represents","a","single","tuple","of","tensors","."]
code: def testFromTensorsSparse(self):
      """Test a dataset that represents a single tuple of tensors."""
      components = (
          sparse_tensor.SparseTensorValue(
              indices=np.array([[0]]),
              values=np.array([0]),
              dense_shape=np.array([1]),
          ),
          sparse_tensor.SparseTensorValue(
              indices=np.array([[0, 0], [1, 1]]),
              values=np.array([-1, 1]),
              dense_shape=np.array([2, 2]),
          ),
      )
  
      dataset = dataset_ops.Dataset.from_tensors(components)
  
      self.assertEqual(
          [tensor_shape.TensorShape(c.dense_shape) for c in components],
          [
              shape
              for shape in dataset_ops.get_legacy_output_shapes(dataset)
          ],
      )
      self.assertDatasetProduces(dataset, expected_output=[components])
  
imports: import collections
  import dataclasses
  from absl.testing import parameterized
  import numpy
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.python.client import session
  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.data.util import nest
  from tensorflow.python.framework import combinations
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.ops import tensor_array_ops
  from tensorflow.python.ops.ragged import ragged_factory_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 4 for calling the FromTensorsTest obj's underlying member method code with example usage: obj.testFromTensorsSparse() without return types