import re


def srcdb_info_key(srcdb_info):
    """
    Return the sort key to use for srcdb maps parsed from the course
    search JavaScript.
    """
    match = re.fullmatch(r"(Fall|Spring) (\d{4})", srcdb_info["name"])
    if not match:
        return (False,)
    semester, year = match.groups()
    return (int(year), semester == "Fall")