code: def testDocStringExample(self):
      rt = ragged_factory_ops.constant([[1, 2, 3], [4], [], [5, 6]])
      st = self.evaluate(rt.to_sparse())
      self.assertAllEqual(
          st.indices, [[0, 0], [0, 1], [0, 2], [1, 0], [3, 0], [3, 1]]
      )
      self.assertAllEqual(st.values, [1, 2, 3, 4, 5, 6])
      self.assertAllEqual(st.dense_shape, [4, 3])
  
imports: from tensorflow.python.eager import context
  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 gradients_impl
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops.ragged import ragged_factory_ops
  from tensorflow.python.ops.ragged import ragged_functional_ops
  from tensorflow.python.ops.ragged import ragged_tensor
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 1 for calling the RaggedTensorToSparseOpTest obj's underlying member method code with example usage: obj.testDocStringExample() without return types