parameters: (group, group_rank_id, backend)
return_statement: return world_rank_id
docstring: The Helper to do get_world_rank_from_group_rank.
  
      Args:
          group (str): The user communication group.
          group_rank_id (int): A rank id in user communication group.
          backend (str): The backend, like "hccl".
  
      Raises:
          TypeError: If group_rank_id is not int.
          ValueError: If group is "hccl_world_group" or backend is invalid.
  
      Returns:
          Integer. A rank id in world communication group.
docstring_summary: The Helper to do get_world_rank_from_group_rank.
docstring_tokens: The Helper to do get_world_rank_from_group_rank .
function: def _get_world_rank_from_group_rank_helper(group, group_rank_id, backend):
      """
      The Helper to do get_world_rank_from_group_rank.
  
      Args:
          group (str): The user communication group.
          group_rank_id (int): A rank id in user communication group.
          backend (str): The backend, like "hccl".
  
      Raises:
          TypeError: If group_rank_id is not int.
          ValueError: If group is "hccl_world_group" or backend is invalid.
  
      Returns:
          Integer. A rank id in world communication group.
      """
      world_rank_id = None
      if not isinstance(group_rank_id, int):
          raise TypeError("For 'get_world_rank_from_group_rank', the argument 'group_rank_id' must be"
                          " type of int, but got 'group_rank_id' type : {}.".format(type(group_rank_id)))
      if backend == Backend.HCCL:
          if group == HCCL_WORLD_COMM_GROUP:
              raise ValueError("For 'get_world_rank_from_group_rank' on GPU, the argument 'group' "
                               "should be 'NCCL_WORLD_COMM_GROUP', but got 'HCCL_WORLD_COMM_GROUP'.")
          world_rank_id = hccl.get_world_rank_from_group_rank(group, group_rank_id)
      elif backend == Backend.NCCL:
          raise RuntimeError("Nccl doesn't support get_world_rank_from_group_rank now.")
      else:
          raise ValueError("The argument 'backend' {} is not supported, please use hccl.".format(backend))
      return world_rank_id
function_tokens: def _get_world_rank_from_group_rank_helper ( group , group_rank_id , backend ) : world_rank_id = None if not isinstance ( group_rank_id , int ) : raise TypeError ( "For 'get_world_rank_from_group_rank', the argument 'group_rank_id' must be" " type of int, but got 'group_rank_id' type : {}." . format ( type ( group_rank_id ) ) ) if backend == Backend . HCCL : if group == HCCL_WORLD_COMM_GROUP : raise ValueError ( "For 'get_world_rank_from_group_rank' on GPU, the argument 'group' " "should be 'NCCL_WORLD_COMM_GROUP', but got 'HCCL_WORLD_COMM_GROUP'." ) world_rank_id = hccl . get_world_rank_from_group_rank ( group , group_rank_id ) elif backend == Backend . NCCL : raise RuntimeError ( "Nccl doesn't support get_world_rank_from_group_rank now." ) else : raise ValueError ( "The argument 'backend' {} is not supported, please use hccl." . format ( backend ) ) return world_rank_id