code: def test_dense_to_sparse_unknown_1d_shape(self):
      tensor = tf1.placeholder_with_default(
          np.array([0, 100, 0, 3], np.int32), shape=[None]
      )
      st = sparse.dense_to_sparse(tensor)
      result = self.evaluate(st)
      self.assertAllEqual([[1], [3]], result.indices)
      self.assertAllEqual([100, 3], result.values)
      self.assertAllEqual([4], result.dense_shape)
  
file_path: probability/tensorflow_probability/python/math/sparse_test.py
imports: import numpy
  import tensorflow.compat.v1
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import sparse
label_desc: Use image node_id 8 for calling the SparseTest obj's underlying member method code with example usage: obj.test_dense_to_sparse_unknown_1d_shape() without return types