code: def in_segmentlist(column, segmentlist):
      
      segmentlist = type(segmentlist)(segmentlist).coalesce()
      idx = column.argsort()
      contains = numpy.zeros(column.shape[0], dtype=bool)
      j = 0
      try:
          segstart, segend = segmentlist[j]
      except IndexError:  # no segments, return all False
          return contains
      i = 0
      while i < contains.shape[0]:
          # extract time for this index
          x = idx[i]  # <- index in original column
          time = column[x]
          # if before start, move to next value
          if time < segstart:
              i += 1
              continue
          # if after end, find the next segment and check value again
          if time >= segend:
              j += 1
              try:
                  segstart, segend = segmentlist[j]
                  continue
              except IndexError:
                  break
          # otherwise value must be in this segment
          contains[x] = True
          i += 1
      return contains
docs: 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