parameters: (group="hccl_world_group")
return_statement: return c_rank_id.value
docstring: A function that returns the rank id of the calling process, within the given collection communication group.
  
      Returns:
          An integer scalar with the rank id of the calling process.
docstring_summary: A function that returns the rank id of the calling process, within the given collection communication group.
docstring_tokens: A function that returns the rank id of the calling process within the given collection communication group .
function: def get_rank_id(group="hccl_world_group"):
      """
      A function that returns the rank id of the calling process, within the given collection communication group.
  
      Returns:
          An integer scalar with the rank id of the calling process.
      """
  
      if context.get_context("mode") == context.PYNATIVE_MODE:
          return get_hccl_rank_id()
  
      check_group(group)
      c_group = c_str(group)
      c_rank_id = ctypes.c_uint()
      ret = HCCL_LIB_CTYPES.HcomGetRankId(c_group, ctypes.byref(c_rank_id))
      if ret != 0:
          raise RuntimeError('Get rank id error.')
  
      return c_rank_id.value
function_tokens: def get_rank_id ( group = "hccl_world_group" ) : if context . get_context ( "mode" ) == context . PYNATIVE_MODE : return get_hccl_rank_id ( ) check_group ( group ) c_group = c_str ( group ) c_rank_id = ctypes . c_uint ( ) ret = HCCL_LIB_CTYPES . HcomGetRankId ( c_group , ctypes . byref ( c_rank_id ) ) if ret != 0 : raise RuntimeError ( 'Get rank id error.' ) return c_rank_id . value