code: def testGradientInput(self):
      for tr_a in [True, False]:
          for tr_b in [True, False]:
              for sp_a in [True, False]:
                  for sp_b in [True, False]:
                      for a_dtype in (dtypes.float32, dtypes.bfloat16):
                          for b_dtype in (
                              dtypes.float32,
                              dtypes.bfloat16,
                          ):
                              # Note: bfloat16 only has 7 mantissa bits, versus float32 with
                              # 10. Hence, we shift by 2 bits to pass the test.
                              if (
                                  a_dtype == dtypes.bfloat16
                                  and b_dtype == dtypes.bfloat16
                              ):
                                  delta = 1 / 16.0
                              else:
                                  delta = 1 / 64.0
                              name = "sparse_matmul_%s_%s_%s_%s" % (
                                  tr_a,
                                  tr_b,
                                  sp_a,
                                  sp_b,
                              )
                              self._testGradients(
                                  tr_a,
                                  tr_b,
                                  sp_a,
                                  sp_b,
                                  a_dtype,
                                  b_dtype,
                                  delta,
                                  name,
                              )
  
file_path: tensorflow/tensorflow/python/kernel_tests/sparse_ops/sparse_matmul_op_test.py
imports: import numpy
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import gradient_checker
  from tensorflow.python.ops import math_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 2 for calling the MatMulGradientTest obj's underlying member method code with example usage: obj.testGradientInput() without return types