code: def test_sparse_input_shape(self):
      input_data = get_input_dataset(
          tf.sparse.SparseTensor(
              indices=[[0, 0], [1, 2]],
              values=[1, 2],
              dense_shape=[3, 4],
          )
      )
  
      expected_output = np.array(
          [
              [1.0, 0.0, 0.0, 0.0],
              [0.0, 0.0, 2.0, 0.0],
              [0.0, 0.0, 0.0, 0.0],
          ]
      )
  
      layers = [ToDense(shape=[3, 4]), Final()]
      model = get_model_from_layers(
          layers,
          input_shape=(None,),
          input_sparse=True,
          input_dtype=tf.dtypes.int32,
      )
      model.compile(optimizer="sgd", loss="mse", metrics=["accuracy"])
      output = model.predict(input_data)
      self.assertAllEqual(output, expected_output)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow.python.framework import test_util
  from tensorflow_text.python.keras.layers.todense import ToDense
label_desc: Use image node_id 4 for calling the SparseTensorsToDenseLayerTest obj's underlying member method code with example usage: obj.test_sparse_input_shape() without return types