code: def test_pooling(
      self, use_cpu_only, backend, op, data_format, pool_size
  ):
      shape = None
      if op in {
          tf.keras.layers.AveragePooling1D,
          tf.keras.layers.MaxPool1D,
      }:
          shape = np.random.randint(low=3, high=9, size=3)
          pool_size = pool_size[2]
      elif op in {
          tf.keras.layers.AveragePooling2D,
          tf.keras.layers.MaxPool2D,
      }:
          if data_format == "channels_first":
              return  # AvgPoolingOp only supports NHWC on CPU
          shape = np.random.randint(low=3, high=9, size=4)
          pool_size = pool_size[1:]
      elif op in {
          tf.keras.layers.AveragePooling3D,
          tf.keras.layers.MaxPool3D,
      }:
          shape = np.random.randint(low=3, high=9, size=5)
      model = tf.keras.Sequential(
          [
              op(
                  batch_input_shape=shape,
                  pool_size=pool_size,
                  data_format=data_format,
              )
          ]
      )
      run_compare_tf_keras(
          model,
          [random_gen(shape, rand_min=-10, rand_max=10)],
          use_cpu_only=use_cpu_only,
          backend=backend,
      )
  
imports: import random
  from coremltools.converters.mil import testing_reqs
  from coremltools.converters.mil.frontend.tensorflow2.test.testing_utils import run_compare_tf_keras
  from coremltools.converters.mil.testing_reqs import *
label_desc: Use image node_id 2 for calling the TestPooling obj's underlying member method code with example usage: obj.test_pooling(use_cpu_only, backend, op, data_format, pool_size) without return types