code: def parse_pooler(input_dim, cfg) -> nn.Module:
      if cfg.POOLER == "atn":
          return AtnPool(
              input_dim,
              cfg.ATN_POOL_DIM,
              cfg.ATN_POOL_HEADS,
              cfg.DROPOUT,
          )
      elif cfg.POOLER == "avg":
          return AvgPool()
      elif cfg.POOLER == "max":
          return MaxPool()
      else:
          raise ValueError(f"unknown pooler {cfg.POOLER}")
  
imports: from collections import OrderedDict
  import os
  import numpy
  import torch
  from torch import nn
  from gluoncv.torch.utils.coot_utils import truncated_normal_fill
label_desc: Use image node_id 1 for calling a global function with example usage: parse_pooler(input_dim, cfg) and returns: AtnPool, AvgPool, MaxPool