code: def get_norm_layer(
      name: tuple | str,
      spatial_dims: int | None = 1,
      channels: int | None = 1,
  ):
      """
      Create a normalization layer instance.
  
      For example, to create normalization layers:
  
      .. code-block:: python
  
          from monai.networks.layers import get_norm_layer
  
          g_layer = get_norm_layer(name=("group", {"num_groups": 1}))
          n_layer = get_norm_layer(name="instance", spatial_dims=2)
  
      Args:
          name: a normalization type string or a tuple of type string and parameters.
          spatial_dims: number of spatial dimensions of the input.
          channels: number of features/channels when the normalization layer requires this parameter
              but it is not specified in the norm parameters.
      """
      if name == "":
          return torch.nn.Identity()
      norm_name, norm_args = split_args(name)
      norm_type = Norm[norm_name, spatial_dims]
      kw_args = dict(norm_args)
      if (
          has_option(norm_type, "num_features")
          and "num_features" not in kw_args
      ):
          kw_args["num_features"] = channels
      if (
          has_option(norm_type, "num_channels")
          and "num_channels" not in kw_args
      ):
          kw_args["num_channels"] = channels
      return norm_type(**kw_args)
  
file_path: MONAI/monai/networks/layers/utils.py
imports: from __future__ import annotations
  import torch.nn
  from monai.networks.layers.factories import Act, Dropout, Norm, Pool, split_args
  from monai.utils import has_option
label_desc: Use image node_id 1 for calling a global function with example usage: get_norm_layer(name, spatial_dims, channels) and returns: norm_type, torch