code: def get_global_rank(group: Any, rank: int) -> int:
      if group is dist.group.WORLD:
          return rank
  
      return dist.distributed_c10d._get_global_rank(group, rank)
  
file_path: fairscale/fairscale/internal/params.py
imports: import collections.abc
  from dataclasses import dataclass
  from math import inf
  from typing import Any, Callable, Dict, List, Optional
  import torch
  import torch.distributed
label_desc: Use image node_id 1 for calling a global function with example usage: get_global_rank(group, rank) and returns: dist, rank