class_docstr: https://arxiv.org/abs/1704.02112
code: def forward(self, x: torch.Tensor):  # skipcq: PYL-W0221
      spatial_size = x.size(2) * x.size(3)
      assert spatial_size == self.conv.kernel_size[0], (
          f"Expected spatial size {self.conv.kernel_size[0]}, "
          f"got {x.size(2)}x{x.size(3)}"
      )
  
      x = x.view(x.size(0), x.size(1), -1)  # Flatten spatial dimensions
      x_sorted, index = x.topk(spatial_size, dim=2)
  
      x = self.conv(x_sorted)  # [B, C, 1]
  
      if self.flatten:
          x = x.squeeze(2)
      return x
  
imports: from typing import Union, Dict
  import torch
  import torch.nn.functional
  from torch.nn.modules.module import _IncompatibleKeys
  from torch import Tensor, nn
label_desc: Use image node_id 2 for calling the GlobalRankPooling obj's underlying member method code with example usage: obj.forward(x) and returns: x