code: def testSparseTensorDenseAddGradients(self):
      np.random.seed(1618)  # Make it reproducible.
      n, m = np.random.randint(30, size=2)
      rand_vals_np = np.random.randn(n, m).astype(np.float32)
      dense_np = np.random.randn(n, m).astype(np.float32)
  
      with self.session(use_gpu=False):
          sparse, nnz = _sparsify(rand_vals_np)
          dense = constant_op.constant(dense_np, dtype=dtypes.float32)
          s = sparse_ops.sparse_add(sparse, dense)
  
          err = gradient_checker.compute_gradient_error(
              [sparse.values, dense], [(nnz,), (n, m)], s, (n, m)
          )
          self.assertLess(err, 1e-3)
  
imports: import timeit
  import numpy
  from tensorflow.python.client import session
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors_impl
  from tensorflow.python.framework import ops
  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 math_ops
  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 10 for calling the SparseAddTest obj's underlying member method code with example usage: obj.testSparseTensorDenseAddGradients() without return types