code: def _testGradients(
      self, adjoint_a, adjoint_b, name, values_dtype, indices_dtype
  ):
      n, k, m = np.random.randint(1, 10, size=3)
      sp_t, nnz = self._randomTensor(
          [n, k],
          values_dtype,
          adjoint=adjoint_a,
          sparse=True,
          indices_dtype=indices_dtype,
      )
      dense_t = self._randomTensor(
          [k, m], values_dtype, adjoint=adjoint_b
      )
  
      matmul = sparse_ops.sparse_tensor_dense_matmul(
          sp_t,
          dense_t,
          adjoint_a=adjoint_a,
          adjoint_b=adjoint_b,
          name=name,
      )
  
      with self.cached_session():
          dense_t_shape = [m, k] if adjoint_b else [k, m]
          sp_t_val_shape = [nnz]
          delta = 1 / 16.0 if values_dtype == np.float16 else 1e-3
          tolerance = (
              delta / 2.0 if values_dtype == np.float16 else 1e-3
          )
          err = gradient_checker.compute_gradient_error(
              [dense_t, sp_t.values],
              [dense_t_shape, sp_t_val_shape],
              matmul,
              [n, m],
              delta=delta,
          )
          print("%s gradient err = %s" % (name, err))
          self.assertLess(err, tolerance)
  
file_path: tensorflow-upstream/tensorflow/python/kernel_tests/sparse_ops/sparse_tensor_dense_matmul_grad_test.py
imports: import numpy
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import gradient_checker
  from tensorflow.python.ops import sparse_ops
  import tensorflow.python.ops.sparse_grad
  from tensorflow.python.platform import test
label_desc: Use image node_id 3 for calling the SparseTensorDenseMatMulGradientTest obj's underlying member method code with example usage: obj._testGradients(adjoint_a, adjoint_b, name, values_dtype, indices_dtype) without return types