code: def gap2d():
      """Helper for building a global average pooling layer."""
      return nn.AdaptiveAvgPool2d((1, 1))
  
imports: import numpy
  from torch import nn
  from detectron2.layers import CNNBlockBase, ShapeSpec, get_norm
  from .backbone import Backbone
label_desc: Use image node_id 2 for calling a global function with example usage: gap2d() and returns: nn