parameters: (rank_num)
docstring: A function that check if a collection communication rank number is legal.If not raise error.
  
      Returns:
          None
docstring_summary: A function that check if a collection communication rank number is legal.If not raise error.
docstring_tokens: A function that check if a collection communication rank number is legal . If not raise error .
function: def check_rank_num(rank_num):
      """
      A function that check if a collection communication rank number is legal.If not raise error.
  
      Returns:
          None
      """
      if isinstance(rank_num, (int)):
          if rank_num > MAX_RANK_NUM or rank_num <= 0:
              raise ValueError("For 'create_group', the size of argument 'rand_ids' should be greater than 0 and"
                               "less than {}, but got the size of 'rank_ids' : {}.".format(MAX_RANK_NUM, rank_num))
      else:
          raise TypeError("The argument 'rank_num' must be type of int, "
                          "but got 'rank_num' type : {}.".format(type(rank_num)))
function_tokens: def check_rank_num ( rank_num ) : if isinstance ( rank_num , ( int ) ) : if rank_num > MAX_RANK_NUM or rank_num <= 0 : raise ValueError ( "For 'create_group', the size of argument 'rand_ids' should be greater than 0 and" "less than {}, but got the size of 'rank_ids' : {}." . format ( MAX_RANK_NUM , rank_num ) ) else : raise TypeError ( "The argument 'rank_num' must be type of int, " "but got 'rank_num' type : {}." . format ( type ( rank_num ) ) )