def in_segmentlist(column, segmentlist):
segmentlist = type(segmentlist)(segmentlist).coalesce()<EOL>idx = column.argsort()<EOL>contains = numpy.zeros(column.shape[<NUM_LIT:0>], dtype=bool)<EOL>j = <NUM_LIT:0><EOL>try:<EOL><INDENT>segstart, segend = segmentlist[j]<EOL><DEDENT>except IndexError:  <EOL><INDENT>return contains<EOL><DEDENT>i = <NUM_LIT:0><EOL>while i < contains.shape[<NUM_LIT:0>]:<EOL><INDENT>x = idx[i]  <EOL>time = column[x]<EOL>if time < segstart:<EOL><INDENT>i += <NUM_LIT:1><EOL>continue<EOL><DEDENT>if time >= segend:<EOL><INDENT>j += <NUM_LIT:1><EOL>try:<EOL><INDENT>segstart, segend = segmentlist[j]<EOL>continue<EOL><DEDENT>except IndexError:<EOL><INDENT>break<EOL><DEDENT><DEDENT>contains[x] = True<EOL>i += <NUM_LIT:1><EOL><DEDENT>return contains<EOL>
Return the index of values lying inside the given segmentlist

    A `~gwpy.segments.Segment` represents a semi-open interval,
    so for any segment `[a, b)`, a value `x` is 'in' the segment if

    a <= x < b