code: def get_all_ranks_from_group(group=None):
      global cdb
      assert (
          cdb is not None and cdb.is_initialized()
      ), "DeepSpeed backend not set, please initialize it using init_process_group()"
      rank = 0
      group_ranks = []
      try:
          while True:
              group_ranks.append(cdb.get_global_rank(group, rank))
              rank += 1
      except (RuntimeError, ValueError):
          pass
      return group_ranks
  
imports: import torch
  import os
  from ..constants import TORCH_DISTRIBUTED_DEFAULT_PORT, default_pg_timeout
  from .constants import *
  from .reduce_op import *
  from deepspeed.accelerator import get_accelerator
  from deepspeed.comm.ccl import CCLBackend
  from deepspeed.utils.comms_logging import CommsLogger
  from deepspeed.utils import timer, get_caller_func
  from deepspeed.comm.torch import TorchBackend
  from deepspeed import utils
  from datetime import timedelta
  from deepspeed.comm.utils import *
label_desc: Use image node_id 42 for calling a global function with example usage: get_all_ranks_from_group(group) and returns: group_ranks