docstr: Verifies the gradients of a pooling function.
  
  Args:
    pool_func: Function to be called, co.MaxPool, co.AvgPool,
      or the Lua version.
    input_sizes: Input tensor dimensions.
    output_sizes: Output tensor dimensions.
    window: Tuple of kernel dims: planes, rows, cols.
    strides: Tuple of strides for dims: planes, rows, cols.
    padding: Padding type.
    data_format: Data format string.
    data_type: The data type to use to run the pooling operation.
    use_gpu: Whether to run on GPU.
code: def _ConstructAndTestGradientForConfig(
      self,
      pool_func,
      input_sizes,
      output_sizes,
      window,
      strides,
      padding,
      data_format,
      data_type,
      use_gpu,
  ):
      """Verifies the gradients of a pooling function.
  
      Args:
        pool_func: Function to be called, co.MaxPool, co.AvgPool,
          or the Lua version.
        input_sizes: Input tensor dimensions.
        output_sizes: Output tensor dimensions.
        window: Tuple of kernel dims: planes, rows, cols.
        strides: Tuple of strides for dims: planes, rows, cols.
        padding: Padding type.
        data_format: Data format string.
        data_type: The data type to use to run the pooling operation.
        use_gpu: Whether to run on GPU.
      """
      jacob_a, jacob_n = self._getJacobians(
          pool_func,
          input_sizes,
          output_sizes,
          window,
          strides,
          padding,
          data_format,
          use_gpu,
          dtype=data_type.as_numpy_dtype,
      )
  
      if data_type == dtypes.bfloat16:
          # Compare bf16 analytical gradients to fp32 numerical gradients.
          _, jacob_n = self._getJacobians(
              pool_func,
              input_sizes,
              output_sizes,
              window,
              strides,
              padding,
              data_format,
              use_gpu,
              dtype=np.float32,
          )
  
      input_jacob_a, grad_jacob_a = jacob_a
      input_jacob_n, grad_jacob_n = jacob_n
      self.assertAllClose(
          input_jacob_a, input_jacob_n, rtol=1e-3, atol=1e-3
      )
      self.assertAllClose(
          grad_jacob_a, grad_jacob_n, rtol=1e-3, atol=1e-3
      )
  
imports: import numpy
  from tensorflow.python.eager import backprop
  from tensorflow.python.eager import context
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import errors_impl
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gen_nn_ops
  from tensorflow.python.ops import gradient_checker_v2
  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 16 for calling the PoolingTest obj's underlying member method code with example usage: obj._ConstructAndTestGradientForConfig(pool_func, input_sizes, output_sizes, window, strides, padding, data_format, data_type, use_gpu) without return types