def year_deviation(year, proposed_year) -> int:
    """Calculate the difference between the expected year of a film to a
    counterpart release year retrieved from TMDb.

    Args:
        year: (int) the year parsed from the filename.
        proposed_year: (int) the proposed year retrieved from TMDb
    Returns:
        A deviation, in years, between the parsed year and the proposed year.
    """

    # If the original year was not specified,
    # we assume the resulting year is acceptable, and thus we return a 0 deviation.
    if proposed_year is None or year is None: return 0

    # Calculate the absolute difference in years and return the value.
    return int(abs(year - proposed_year))