code: def read_hdf5_segmentlist(h5f, path=None, gpstype=LIGOTimeGPS, **kwargs):
      
      # find dataset
      dataset = io_hdf5.find_dataset(h5f, path=path)
  
      segtable = Table.read(dataset, format='hdf5', **kwargs)
      out = SegmentList()
      for row in segtable:
          start = LIGOTimeGPS(int(row['start_time']), int(row['start_time_ns']))
          end = LIGOTimeGPS(int(row['end_time']), int(row['end_time_ns']))
          if gpstype is LIGOTimeGPS:
              out.append(Segment(start, end))
          else:
              out.append(Segment(gpstype(start), gpstype(end)))
      return out
docs: Read a `SegmentList` object from an HDF5 file or group.