code: def build_norm_layer(chans: int, norm_type: str) -> nn.Module:
      _verify_norm_type(norm_type)
      if norm_type == "batch":
          return nn.BatchNorm2d(chans)
      elif norm_type == "instance":
          return nn.InstanceNorm2d(chans)
      else:
          return nn.Identity()
  
imports: import math
  from functools import partial
  from typing import Callable, List, Optional, Union
  import torch
  import torch.nn
  import torch.nn.functional
  from torch import Tensor
  from torch.nn.utils.parametrizations import spectral_norm
  from ._discriminator import Discriminator
label_desc: Use image node_id 3 for calling a global function with example usage: build_norm_layer(chans, norm_type) and returns: nn, nn, nn