code: def _dense_to_sparse(data):
      """Convert a numpy array to a tf.SparseTensor."""
      indices = np.where(data)
      return tf.SparseTensor(
          np.stack(indices, axis=-1),
          data[indices],
          dense_shape=data.shape,
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import itertools
  from absl.testing import parameterized
  import numpy
  from six.moves import range
  import tensorflow
  import tensorflow_graphics.geometry.convolution.graph_convolution
  from tensorflow_graphics.util import test_case
label_desc: Use image node_id 1 for calling a global function with example usage: _dense_to_sparse(data) and returns: tf