code: def create_norm(in_channels: int, norm_type: str):
      if norm_type == "group":
          return Normalize(in_channels)
      elif norm_type == "channel":
          return ChannelNorm2D(in_channels)
      else:
          raise ValueError(f"Unrecognized norm_type {norm_type}")
  
imports: import logging
  from typing import Optional, Sequence
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from torch import Tensor
  from neuralcompression.layers import XCA, ChannelNorm2D
  from .._outputs._vqvae_autoencoder_output import VqVaeAutoencoderOutput
label_desc: Use image node_id 2 for calling a global function with example usage: create_norm(in_channels, norm_type) and returns: Normalize, ChannelNorm2D