A datetime-version that takes datetime object list as x_axis

def linear_interpolate_by_datetime(datetime_axis, y_axis, datetime_new_axis,
                                   enable_warning=True):
    """A datetime-version that takes datetime object list as x_axis
    """
    numeric_datetime_axis = [
        totimestamp(a_datetime) for a_datetime in datetime_axis
    ]

    numeric_datetime_new_axis = [
        totimestamp(a_datetime) for a_datetime in datetime_new_axis
    ]

    return linear_interpolate(
        numeric_datetime_axis, y_axis, numeric_datetime_new_axis,
        enable_warning=enable_warning)