code: def _check(self, result_tensor, result_np, input_sp_t, tol):
      self.assertTrue(
          isinstance(result_tensor, sparse_tensor.SparseTensor)
      )
      self.assertTrue(
          isinstance(input_sp_t, sparse_tensor.SparseTensor)
      )
      self.assertAllEqual(input_sp_t.indices, result_tensor.indices)
      self.assertAllEqual(
          input_sp_t.dense_shape, result_tensor.dense_shape
      )
      if tol is None:
          self.assertAllClose(result_np, result_tensor.values)
      else:
          self.assertAllClose(
              result_np, result_tensor.values, rtol=tol, atol=tol
          )
  
imports: import math
  import numpy
  from tensorflow.python.eager import backprop
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  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 gen_math_ops
  from tensorflow.python.ops import gradient_checker
  from tensorflow.python.ops import gradient_checker_v2
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nn_grad
  from tensorflow.python.ops import special_math_ops
  from tensorflow.python.platform import test
  from tensorflow.python.platform import tf_logging
label_desc: Use image node_id 2 for calling the UnaryOpTest obj's underlying member method code with example usage: obj._check(result_tensor, result_np, input_sp_t, tol) without return types