def iter_lanes(points):
    """
    Loop through collection of numbers (points) and yield
    the sequential groupings. Any gap in the sequence will
    produce a new grouping

    for example this sequence:

        [1, 2, 3, 7, 8, 9, 12, 13, 14]

    with yield:

        ((1, 2, 3), (7, 8, 9), (12, 13, 14))

    """
    last = -5
    lane = []
    for pt in points:
        if pt == last + 1:
            lane.append(pt)
        else:
            if lane:
                yield lane
            lane = [pt]
        last = pt
    yield lane
