code: def spatial_average(x, keepdim=True):
      return x.mean([2, 3], keepdim=keepdim)
  
imports: from collections import namedtuple
  import torch
  import torch.nn
  from torchvision import models
  from ..util import get_ckpt_path
label_desc: Use image node_id 2 for calling a global function with example usage: spatial_average(x, keepdim) and returns: x