def _gaps_from(intervals):
sliding_window = zip(intervals, intervals[<NUM_LIT:1>:])<EOL>gaps = [b[<NUM_LIT:0>] - a[<NUM_LIT:1>] for a, b in sliding_window]<EOL>return gaps<EOL>
From a list of intervals extract
a list of sorted gaps in the form of [(g,i)]
where g is the size of the ith gap.