code: def get_num_groups(world_size: Optional[int] = None) -> int:
      """
      Gets the number of worker groups.
      Usually equivalent to max_nnodes (See https://pytorch.org/docs/stable/elastic/run.html)
      """
      if world_size is None:
          world_size = dist.get_world_size()
      return world_size // 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 5 for calling a global function with example usage: get_num_groups(world_size) and returns: unknown