def return_segments(shape, break_points):
<EOL>segs = []<EOL>bp = <NUM_LIT:0> <EOL>bp2 = <NUM_LIT:0><EOL>for i in range(len(break_points)-<NUM_LIT:1>):<EOL><INDENT>bp = break_points[i] if break_points[i] is not None else bp2<EOL>bp2 = break_points[i+<NUM_LIT:1>] if break_points[i+<NUM_LIT:1>] is not None else bp<EOL>segs.append(shape[bp:bp2+<NUM_LIT:1>])<EOL><DEDENT>segs.append([])<EOL>return segs<EOL>
Break a shape into segments between stops using break_points.

    This function can use the `break_points` outputs from
    `find_segments`, and cuts the shape-sequence into pieces
    corresponding to each stop.