code: def is_norm(layer, exclude=None):
      """Check if a layer is a normalization layer.
  
      Args:
          layer (nn.Module): The layer to be checked.
          exclude (type | tuple[type]): Types to be excluded.
  
      Returns:
          bool: Whether the layer is a norm layer.
      """
      if exclude is not None:
          if not isinstance(exclude, tuple):
              exclude = (exclude,)
          if not is_tuple_of(exclude, type):
              raise TypeError(
                  f'"exclude" must be either None or type or a tuple of types, '
                  f"but got {type(exclude)}: {exclude}"
              )
  
      if exclude and isinstance(layer, exclude):
          return False
  
      all_norm_bases = (
          _BatchNorm,
          _InstanceNorm,
          nn.GroupNorm,
          nn.LayerNorm,
      )
      return isinstance(layer, all_norm_bases)
  
file_path: lavis/lavis/common/annotator/uniformer/mmcv/cnn/bricks/norm.py
imports: import inspect
  import torch.nn
  from annotator.uniformer.mmcv.utils import is_tuple_of
  from annotator.uniformer.mmcv.utils.parrots_wrapper import SyncBatchNorm, _BatchNorm, _InstanceNorm
  from .registry import NORM_LAYERS
label_desc: Use image node_id 3 for calling a global function with example usage: is_norm(layer, exclude) and returns: isinstance, False