def get_rank_value(cls, name):
    """Returns the integer constant value for the given rank name.

    :param string rank: the string rank name (E.g., 'HARDCODED').
    :returns: the integer constant value of the rank.
    :rtype: int
    """
    if name in cls._RANK_NAMES.values():
      return getattr(cls, name, None)
    return None
Returns the integer constant value for the given rank name.

    :param string rank: the string rank name (E.g., 'HARDCODED').
    :returns: the integer constant value of the rank.
    :rtype: int