class_docstr: Base pooling layer.
class_docstr_tok: ["Base","pooling","layer","."]
code: def call(self, inputs):
      if self.pool_mode == "max":
          return ops.max_pool(
              inputs,
              pool_size=self.pool_size,
              strides=self.strides,
              padding=self.padding,
              data_format=self.data_format,
          )
      elif self.pool_mode == "average":
          return ops.average_pool(
              inputs,
              pool_size=self.pool_size,
              strides=self.strides,
              padding=self.padding,
              data_format=self.data_format,
          )
      else:
          raise ValueError(
              "`pool_mode` must be either 'max' or 'average'. Received: "
              f"{self.pool_mode}."
          )
  
file_path: keras/keras/layers/pooling/base_pooling.py
imports: from keras import backend
  from keras import ops
  from keras.layers.input_spec import InputSpec
  from keras.layers.layer import Layer
  from keras.ops.operation_utils import compute_pooling_output_shape
  from keras.utils import argument_validation
label_desc: Use image node_id 2 for calling the BasePooling obj's underlying member method code with example usage: obj.call(inputs) and returns: ops, ops