code: def get_group_rank(
      world_size: Optional[int] = None, rank: Optional[int] = None
  ) -> int:
      """
      Gets the group rank of the worker group. Also available with GROUP_RANK environment varible
      A number between 0 and get_num_groups() (See https://pytorch.org/docs/stable/elastic/run.html)
      """
      if rank is None:
          rank = dist.get_rank()
      return rank // get_local_size(world_size)
  
file_path: torchrec/torchrec/distributed/comm.py
imports: import logging
  import os
  from typing import List, Optional, Tuple
  import torch
  import torch.distributed
label_desc: Use image node_id 4 for calling a global function with example usage: get_group_rank(world_size, rank) and returns: unknown