code: def _test_gradient(self, input_shape, **kwargs):
      x_val = (
          -np.arange(np.prod(input_shape), dtype=np.float32).reshape(
              input_shape
          )
          - 1
      )
      x = constant_op.constant(x_val, name="x", dtype=dtypes.float32)
      output = nn_ops.pool(input=x, **kwargs)
      y_shape = output.get_shape().as_list()
      err = gradient_checker.compute_gradient_error(
          [x], [input_shape], output, y_shape, x_init_value=[x_val]
      )
      err_tolerance = 1e-2
      self.assertLess(err, err_tolerance)
  
imports: import math
  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 nn_ops
  import tensorflow.python.ops.nn_grad
  from tensorflow.python.platform import test
label_desc: Use image node_id 7 for calling the PoolingTest obj's underlying member method code with example usage: obj._test_gradient(input_shape) without return types