def is_year_in_range(year: str, min_year: int, max_year: int) -> bool:
    """
    Return if year is a four digits year in between a range.

    Parameter
    ---------
    year: str
        a four digits year.
    min_year: int
        minimum year (inclusive) for year to be valid.
    max_year: int
        maximum year (inclusive) for year to be valid.

    Return
    ------
    bool
        True if pid is valid, False othewise.
    """
    if len(year) != 4:
        return False
    if not all((char.isdigit() for char in year)):
        return False
    return min_year <= int(year) <= max_year