code: def test_convert_sparse_indices(self):
      exception_cls = tf.errors.InvalidArgumentError
      error_string = "Condition x == y did not hold element-wise:"
      sparse = tf.SparseTensor(
          indices=[[0, 0, 0], [1, 0, 1], [2, 0, 2], [3, 0, 1]],
          values=[3, 2, -1, 3],
          dense_shape=[4, 2, 5],
      )
      dense = tf.constant(["a", "b", "c", "d"])
      x, key = tf_utils._validate_and_get_dense_value_key_inputs(
          sparse, sparse
      )
      self.assertAllEqual(self.evaluate(x), sparse.values)
      self.assertAllEqual(self.evaluate(key), sparse.values)
  
      x, key = tf_utils._validate_and_get_dense_value_key_inputs(
          sparse, dense
      )
      self.assertAllEqual(self.evaluate(x), sparse.values)
      self.assertAllEqual(self.evaluate(key), dense)
  
      with tf.compat.v1.Graph().as_default():
          sparse1 = tf.compat.v1.sparse_placeholder(
              tf.int64, shape=[None, None, None]
          )
          sparse2 = tf.compat.v1.sparse_placeholder(
              tf.int64, shape=[None, None, None]
          )
          sparse_value1 = tf.compat.v1.SparseTensorValue(
              indices=[[0, 0, 0], [1, 0, 1], [2, 0, 2], [3, 0, 1]],
              values=[3, 2, -1, 3],
              dense_shape=[4, 2, 5],
          )
          sparse_value2 = tf.compat.v1.SparseTensorValue(
              indices=[[0, 0, 0], [1, 0, 2], [2, 0, 2], [3, 0, 1]],
              values=[3, 2, -1, 3],
              dense_shape=[4, 2, 5],
          )
  
          with tf.compat.v1.Session() as sess:
              with self.assertRaisesRegexp(exception_cls, error_string):
                  sess.run(
                      tf_utils._validate_and_get_dense_value_key_inputs(
                          sparse1, sparse2
                      ),
                      feed_dict={
                          sparse1: sparse_value1,
                          sparse2: sparse_value2,
                      },
                  )
  
imports: import os
  import numpy
  from packaging import version
  import tensorflow
  from tensorflow_transform import analyzers
  from tensorflow_transform import annotators
  from tensorflow_transform import tf_utils
  from tensorflow_transform import test_case
  from tensorflow.python.framework import composite_tensor
label_desc: Use image node_id 26 for calling the TFUtilsTest obj's underlying member method code with example usage: obj.test_convert_sparse_indices() without return types