Convert python date to Epiweek

def date_to_epiweek(date=datetime.date.today()) -> Epiweek:
    """
    Convert python date to Epiweek
    """

    year = date.year
    start_dates = list(map(_start_date_of_year, [year - 1, year, year + 1]))

    start_date = start_dates[1]
    if start_dates[1] > date:
        start_date = start_dates[0]
    elif date >= start_dates[2]:
        start_date = start_dates[2]

    return Epiweek(
        year=(start_date + datetime.timedelta(days=7)).year,
        week=((date - start_date).days // 7) + 1,
        day=(date.isoweekday() % 7) + 1
    )