code: def _get_norm(trunk_config):
      """
      return the normalization layer to use in the model based on the layer name
      """
      layer_name = trunk_config.NORM
      n_groups = trunk_config.GROUPNORM_GROUPS
  
      def group_norm(num_channels):
          return nn.GroupNorm(
              num_groups=n_groups, num_channels=num_channels
          )
  
      return {
          RESNET_NORM_LAYER.BatchNorm: nn.BatchNorm2d,
          RESNET_NORM_LAYER.LayerNorm: LayerNorm2d,
          RESNET_NORM_LAYER.GroupNorm: group_norm,
      }[layer_name]
  
imports: import logging
  import math
  import warnings
  from enum import Enum
  from typing import Dict, List, Tuple
  import torch
  import torch.distributed
  import torch.nn
  import torch.nn.functional
  from torch.nn.modules.utils import _ntuple
  from torch.utils.checkpoint import checkpoint
  from vissl.data.collators.collator_helper import MultiDimensionalTensor
  from vissl.utils.activation_checkpointing import checkpoint_trunk
  from vissl.utils.env import get_machine_local_and_dist_rank
  from vissl.utils.misc import is_apex_available
label_desc: Use image node_id 8 for calling a global function with example usage: _get_norm(trunk_config) and returns: dict, nn