from typing import List


def select_appropriate_durations(
        current_time: float,
        total_time: float,
        current_measure_durations: List[float],
        valid_rhythmic_patterns: List[List[float]]
) -> List[float]:
    """
    Find all options to continue rhythm of unfinished measure one note ahead.

    :param current_time:
        total duration of all previous notes
    :param total_time:
        required total time of all notes to be generated
    :param current_measure_durations:
        durations of notes (in fractions of whole measure)
        from start of the measure to the last added duration
    :param valid_rhythmic_patterns:
        list of all valid ways to split a measure duration into durations of
        its notes; every note duration must be given in fractions of measure
    :return:
        all possible durations of the next note
    """
    all_durations = [0.125, 0.25, 0.5, 1.0]
    appropriate_durations = []
    for duration in all_durations:
        if current_time + duration > total_time:
            continue
        extended_durations = current_measure_durations + [duration]
        for valid_pattern in valid_rhythmic_patterns:
            if valid_pattern[:len(extended_durations)] == extended_durations:
                appropriate_durations.append(duration)
                break
    return appropriate_durations