def interpolate_data(diff, prev_value, current_value):
    """Returns interpolated value.

    :param diff: difference between values e.g:
    temperature from user: 71 (requested value),
    temperature previous: 70,
    temperature next: 80,
    diff = (temperature_from_user - temperature_previous) / (temperature_next - temperature_previous)
    :param prev_value: previous value
    :param current_value: next value
    """
    return prev_value + diff * (current_value - prev_value)