import keyword
import builtins


def is_reserved_identifier(token):
    """Check if `token` is a reserved Python identifier.

    Args:
        token (str): String sequence with a specific definition (for parser).

    Returns:
        bool: True if `token` is a reserved identifier, False otherwise.
    """

    return keyword.iskeyword(token) or hasattr(builtins, token)