code: def _get_data_segments(channels, start, end, connection):
      
      allsegs = io_nds2.get_availability(channels, start, end,
                                         connection=connection)
      return allsegs.intersection(allsegs.keys())
docs: Get available data segments for the given channels