code: def assert_is_norm_layer(module) -> bool:
      """Check if the module is a norm layer.
  
      Args:
          module (nn.Module): The module to be checked.
  
      Returns:
          bool: Whether the module is a norm layer.
      """
      from .parrots_wrapper import _BatchNorm, _InstanceNorm
      from torch.nn import GroupNorm, LayerNorm
  
      norm_layer_candidates = (
          _BatchNorm,
          _InstanceNorm,
          GroupNorm,
          LayerNorm,
      )
      return isinstance(module, norm_layer_candidates)
  
file_path: lavis/lavis/common/annotator/uniformer/mmcv/utils/testing.py
imports: import sys
  from collections.abc import Iterable
  from runpy import run_path
  from shlex import split
  from typing import Any, Dict, List
  from unittest.mock import patch
label_desc: Use image node_id 7 for calling a global function with example usage: assert_is_norm_layer(module) and returns: isinstance