code: def testGather(self):
      def f(params):
          index_values = [1, 3]
          indices = constant_op.constant(index_values, name="i")
          return array_ops.gather(params, indices, name="y")
  
      p_shape = (4, 2)
      p_size = 8
      params = constant_op.constant(
          np.arange(p_size).astype(np.float64), shape=p_shape, name="p"
      )
      error = gradient_checker.max_error(
          *gradient_checker.compute_gradient(f, [params])
      )
      tf_logging.info("gather error = %f", error)
      self.assertLess(error, 1e-4)
  
imports: 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 sparse_tensor
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import custom_gradient
  from tensorflow.python.ops import gradient_checker_v2
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nn_ops
  from tensorflow.python.ops import sparse_ops
  import tensorflow.python.ops.nn_grad
  from tensorflow.python.platform import test
  from tensorflow.python.platform import tf_logging
label_desc: Use image node_id 7 for calling the GradientCheckerTest obj's underlying member method code with example usage: obj.testGather() and returns: array_ops