class_docstr: This class implements global pooling with linear projection
code: def forward(self, x: Tensor, *args, **kwargs) -> Tensor:
      # x is of shape [batch, in_dim]
      assert (
          x.dim() == 4
      ), "Input should be 4-dimensional (Batch x in_dim x in_height x in_width). Got: {}".format(
          x.shape
      )
  
      # [batch, in_dim, in_height, in_width] --> [batch, in_dim]
      x = self.pool(x)
      # [batch, in_dim]  x [in_dim, out_dim] --> [batch, out_dim]
      if not self.use_identity:
          x = x @ self.proj
      if self.feature_normalization:
          x = F.normalize(x, dim=-1)
      return x
  
file_path: ml-cvnets/cvnets/image_projection_layers/global_pool_2d.py
imports: import argparse
  import torch
  from torch import Tensor, nn
  from torch.nn import functional
  from cvnets.image_projection_layers import IMAGE_PROJECTION_HEAD_REGISTRY, BaseImageProjectionHead
  from cvnets.layers import GlobalPool
  from utils import logger
  from utils.ddp_utils import is_master
label_desc: Use image node_id 4 for calling the GlobalPool2D obj's underlying member method code with example usage: obj.forward(x) and returns: x