def eyr_valid(passport):
    """ Check that eyr is valid

    eyr (Expiration Year) - four digits; at least 2020 and at most 2030.

    :param passport: passport
    :return: boolean
    """
    return len(passport['eyr']) == 4 and 2020 <= int(passport['eyr']) <= 2030