@staticmethod<EOL><INDENT>def merge(intervals):<DEDENT>
out = []<EOL>for i in sorted(intervals, key=lambda i: i.start):<EOL><INDENT>if out and i.start <= out[-<NUM_LIT:1>].end:<EOL><INDENT>out[-<NUM_LIT:1>].end = max(out[-<NUM_LIT:1>].end, i.end)<EOL><DEDENT>else:<EOL><INDENT>out += i,<EOL><DEDENT><DEDENT>return out<EOL>
Merge two intervals into one.