class_docstr: Base global pooling layer.
code: def compute_output_shape(self, input_shape):
      num_spatial_dims = len(input_shape) - 2
      if self.data_format == "channels_last":
          if self.keepdims:
              return (
                  (input_shape[0],)
                  + (1,) * num_spatial_dims
                  + (input_shape[-1],)
              )
          else:
              return (input_shape[0],) + (input_shape[-1],)
      else:
          if self.keepdims:
              return (input_shape[0], input_shape[1]) + (
                  1,
              ) * num_spatial_dims
          else:
              return (input_shape[0], input_shape[1])
  
file_path: keras/keras/layers/pooling/base_global_pooling.py
imports: from keras.backend import image_data_format
  from keras.layers.input_spec import InputSpec
  from keras.layers.layer import Layer
label_desc: Use image node_id 3 for calling the BaseGlobalPooling obj's underlying member method code with example usage: obj.compute_output_shape(input_shape) and returns: unknown, unknown, unknown, input_shape,  input_shape