from typing import List


def _find_index(distance_along_lane: float, lengths: List[float]) -> int:
    """
    Helper function for finding of path along lane corresponding to the distance_along_lane.
    :param distance_along_lane: Distance along the lane (in meters).
    :param lengths: Cumulative distance at each end point along the paths in the lane.
    :return: Index of path.
    """

    if len(lengths) == 1:
        return 0
    else:
        return min(index for index, length in enumerate(lengths) if distance_along_lane <= length)