code: def forward(self, x):
      assert (
          x.dim() == 4
      ), "input signal should have 4 dims, has {}".format(x.dim())
  
      return x.mean(dim=self.dim, keepdim=self.keepdim)
  
imports: from torch import nn
label_desc: Use image node_id 2 for calling the GlobalAvgPool2d obj's underlying member method code with example usage: obj.forward(x) and returns: x