def match_location(restrictions: dict[str, str], country: str) -> bool:
    """Check whether country is matched by location restrictions."""
    if "exclude" in restrictions and country in restrictions["exclude"]:
        return False
    if (
        "include" in restrictions
        and restrictions["include"] != "world"
        and country not in restrictions["include"]
    ):
        return False
    return True