code: def testMaxPoolGradEagerShapeErrors(self):
      with context.eager_mode():
          orig_in = array_ops.ones((1, 1, 1, 1, 1))
  
          # Test invalid orig_out shape
          orig_out = array_ops.ones((1, 1, 1, 1, 2))
          grad = array_ops.ones((1, 1, 1, 1, 1))
          with self.assertRaisesRegex(
              errors_impl.InvalidArgumentError,
              r"Expected orig_output shape to be \[1,1,1,1,1\], but got "
              r"\[1,1,1,1,2\]",
          ):
              gen_nn_ops.max_pool3d_grad(
                  orig_in,
                  orig_out,
                  grad,
                  ksize=[1, 1, 1, 1, 1],
                  strides=[1, 1, 1, 1, 1],
                  padding="VALID",
              )
          with self.assertRaisesRegex(
              errors_impl.InvalidArgumentError,
              r"Expected orig_output shape to be \[1,1,1,1,1\], but got "
              r"\[1,1,1,1,2\]",
          ):
              gen_nn_ops.max_pool3d_grad_grad(
                  orig_in,
                  orig_out,
                  grad,
                  ksize=[1, 1, 1, 1, 1],
                  strides=[1, 1, 1, 1, 1],
                  padding="VALID",
              )
  
          # Test invalid grad shape
          orig_out = array_ops.ones((1, 1, 1, 1, 1))
          grad = array_ops.ones((1, 1, 1, 1, 2))
          with self.assertRaisesRegex(
              errors_impl.InvalidArgumentError,
              r"Expected grad shape to be \[1,1,1,1,1\], but got \[1,1,1,1,2\]",
          ):
              gen_nn_ops.max_pool3d_grad(
                  orig_in,
                  orig_out,
                  grad,
                  ksize=[1, 1, 1, 1, 1],
                  strides=[1, 1, 1, 1, 1],
                  padding="VALID",
              )
          with self.assertRaisesRegex(
              errors_impl.InvalidArgumentError,
              r"Expected grad shape to be \[1,1,1,1,1\], but got \[1,1,1,1,2\]",
          ):
              gen_nn_ops.max_pool3d_grad_grad(
                  orig_in,
                  orig_out,
                  grad,
                  ksize=[1, 1, 1, 1, 1],
                  strides=[1, 1, 1, 1, 1],
                  padding="VALID",
              )
  
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 38 for calling the PoolingTest obj's underlying member method code with example usage: obj.testMaxPoolGradEagerShapeErrors() without return types