code: def testPoolingRatioIllegalSmallValue(self):
      with self.cached_session() as _:
          # Whether turn on `TF2_BEHAVIOR` generates different error messages
          with self.assertRaisesRegex(
              (errors.InvalidArgumentError, ValueError),
              r"(pooling_ratio cannot be smaller than 1, got: .*)|(is negative)",
          ):
              result = nn_ops.gen_nn_ops.fractional_avg_pool(
                  value=np.zeros([3, 30, 30, 3]),
                  pooling_ratio=[1, -1, 3, 1],
                  pseudo_random=False,
                  overlapping=False,
                  deterministic=False,
                  seed=0,
                  seed2=0,
              )
              self.evaluate(result)
  
imports: import math
  import numpy
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  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
  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 14 for calling the FractionalAvgTest obj's underlying member method code with example usage: obj.testPoolingRatioIllegalSmallValue() without return types