code: def model_parallel_is_initialized() -> bool:
      """Check if model and data parallel groups are initialized."""
      if (
          _MODEL_PARALLEL_GROUP is None
          or _DATA_PARALLEL_GROUP is None
          or _PIPELINE_PARALLEL_GROUP is None
      ):
          return False
      return True
  
file_path: fairscale/fairscale/nn/model_parallel/initialize.py
imports: from typing import List, Optional
  import torch
  from .utils import ensure_divisibility
label_desc: Use image node_id 2 for calling a global function with example usage: model_parallel_is_initialized() and returns: True, False