def french_postal_codes_to_quarter(postal_code):
    """
    Convert a French postal code to the main quarter in France this postal
    code belongs to.

    :param postal_code: The postal code to convert.
    :returns: The quarter of France or ``None``.
    """
    departement = postal_code[:2]

    # Mapping between areas (main subdivisions in French, ISO 3166-2) and
    # French departements
    # Taken from Wikipedia data.
    department_to_subdivision = {
        "FR-ARA": [
            "01",
            "03",
            "07",
            "15",
            "26",
            "38",
            "42",
            "43",
            "63",
            "69",
            "73",
            "74",
        ],
        "FR-BFC": ["21", "25", "39", "58", "70", "71", "89", "90"],
        "FR-BRE": ["22", "29", "35", "44", "56"],
        "FR-CVL": ["18", "28", "36", "37", "41", "45"],
        "FR-COR": ["20"],
        "FR-GES": ["08", "10", "51", "52", "54", "55", "57", "67", "68", "88"],
        "FR-HDF": ["02", "59", "60", "62", "80"],
        "FR-IDF": ["75", "77", "78", "91", "92", "93", "94", "95"],
        "FR-NOR": ["14", "27", "50", "61", "76"],
        "FR-NAQ": [
            "16",
            "17",
            "19",
            "23",
            "24",
            "33",
            "40",
            "47",
            "64",
            "79",
            "86",
            "87",
        ],
        "FR-OCC": [
            "09",
            "11",
            "12",
            "30",
            "31",
            "32",
            "34",
            "46",
            "48",
            "65",
            "66",
            "81",
            "82",
        ],
        "FR-PDL": ["44", "49", "53", "72", "85"],
        "FR-PAC": ["04", "05", "06", "13", "83", "84"],
    }
    subdivision_to_quarters = {
        "FR-IDF": ["FR-IDF"],
        "FR-NW": ["FR-BRE", "FR-CVL", "FR-NOR", "FR-PDL"],
        "FR-NE": ["FR-BFC", "FR-GES", "FR-HDF"],
        "FR-SE": ["FR-ARA", "FR-COR", "FR-PAC", "FR-OCC"],
        "FR-SW": ["FR-NAQ"],
    }

    subdivision = next(
        (i for i, departments in department_to_subdivision.items() if departement in departments),
        None,
    )
    return next(
        (i for i, subdivisions in subdivision_to_quarters.items() if subdivision in subdivisions),
        None,
    )