def find_closest_date(date, list_of_dates):
    """
    This is a helper function that works on Python datetimes. It returns the closest date value,
    and the timedelta from the provided date.
    """
    match = min(list_of_dates, key = lambda x: abs(x - date))
    delta = match - date

    return match, delta