code: def global_max_pool(x, batch, id=None, size=None):
      size = batch.max().item() + 1 if size is None else size
      if cfg.dataset.transform == "ego":
          x = torch.index_select(x, dim=0, index=id)
          batch = torch.index_select(batch, dim=0, index=id)
      return scatter(x, batch, dim=0, dim_size=size, reduce="max")
  
imports: import torch
  from torch_scatter import scatter
  import graphgym.register
  from graphgym.config import cfg
label_desc: Use image node_id 3 for calling a global function with example usage: global_max_pool(x, batch, id, size) and returns: scatter