code: def forward(self, x, mask):
      mask = torch.eq(mask.float(), 0.0).long()
      mask = torch.unsqueeze(mask, dim=1).repeat(1, x.size()[1], 1)
      mask *= -INF
      x += mask
      x, _ = torch.max(x + mask, 2)
      return x
  
file_path: nni/examples/nas/legacy/textnas/utils.py
imports: import logging
  import torch
  import torch.nn
label_desc: Use image node_id 1 for calling the GlobalMaxPool obj's underlying member method code with example usage: obj.forward(x, mask) and returns: x