@functools.cached_property
def overtaking_zones(self) -> List[Tuple[(float, float)]]:
    'Intervals in which the car is allowed to overtake along the\n        :py:attr:`Speaker.middle_line`.'
    obstacles = list((lp.frame for sec in self.sections if (sec.type != road_section_type.PARKING_AREA) for lp in self.get_obstacles_in_section(sec.id)))
    surface_markings = list((surface_marking for sec in self.sections for surface_marking in self.get_surface_markings_in_section(sec.id)))
    blocked_areas = [sm.frame for sm in surface_markings if (sm.id_ == SurfaceMarking.BLOCKED_AREA[0])]
    intervals = list((self.get_interval_for_polygon(obs) for obs in (obstacles + blocked_areas)))
    if (len(intervals) == 0):
        return []
    zone_intervals = [((intervals[0][0] - self.overtaking_buffer), (intervals[0][1] + self.overtaking_buffer))]
    for (start, end) in intervals[1:]:
        last = zone_intervals[(- 1)]
        if ((start - self.overtaking_buffer) < last[1]):
            zone_intervals[(- 1)] = (last[0], (end + self.overtaking_buffer))
        else:
            zone_intervals.append(((start - self.overtaking_buffer), (end + self.overtaking_buffer)))
    return zone_intervals
Intervals in which the car is allowed to overtake along the
:py:attr:`Speaker.middle_line`.
@functools.cached_property
def overtaking_zones(self) -> List[Tuple[(float, float)]]:
    'Intervals in which the car is allowed to overtake along the\n        :py:attr:`Speaker.middle_line`.'
    obstacles = list((lp.frame for sec in self.sections if (sec.type != road_section_type.PARKING_AREA) for lp in self.get_obstacles_in_section(sec.id)))
    surface_markings = list((surface_marking for sec in self.sections for surface_marking in self.get_surface_markings_in_section(sec.id)))
    blocked_areas = [sm.frame for sm in surface_markings if (sm.id_ == SurfaceMarking.BLOCKED_AREA[0])]
    intervals = list((self.get_interval_for_polygon(obs) for obs in (obstacles + blocked_areas)))
    if (len(intervals) == 0):
        return []
    zone_intervals = [((intervals[0][0] - self.overtaking_buffer), (intervals[0][1] + self.overtaking_buffer))]
    for (start, end) in intervals[1:]:
        last = zone_intervals[(- 1)]
        if ((start - self.overtaking_buffer) < last[1]):
            zone_intervals[(- 1)] = (last[0], (end + self.overtaking_buffer))
        else:
            zone_intervals.append(((start - self.overtaking_buffer), (end + self.overtaking_buffer)))
    return zone_intervals