import token


def canonical_category_name(tok):
    """
    Returns the 'canonical' name of the token's category.

    >>> canonical_category_name((1, 'for', (1, 1), (1, 3), 1))
    'NAME'
    >>> canonical_category_name(make_whitespace(' ', (1, 1)))
    'WHITESPACE'
    """
    return token.tok_name.get(tok[0], tok[0])