code: def query_nds2_availability(cls, channels, start, end, ctype=126,
                                  connection=None, host=None, port=None):
          
          start = int(to_gps(start))
          end = int(ceil(to_gps(end)))
          chans = io_nds2.find_channels(channels, connection=connection,
                                        unique=True, epoch=(start, end),
                                        type=ctype)
          availability = io_nds2.get_availability(chans, start, end,
                                                  connection=connection)
          return type(availability)(zip(channels, availability.values()))
docs: Query for when data are available for these channels in NDS2
  
          Parameters
          ----------
          channels : `list`
              list of `Channel` or `str` for which to search
  
          start : `int`
              GPS start time of search, or any acceptable input to
              :meth:`~gwpy.time.to_gps`
  
          end : `int`
              GPS end time of search, or any acceptable input to
              :meth:`~gwpy.time.to_gps`
  
          connection : `nds2.connection`, optional
              open connection to an NDS(2) server, if not given, one will be
              created based on ``host`` and ``port`` keywords
  
          host : `str`, optional
              name of NDS server host
  
          port : `int`, optional
              port number for NDS connection
  
          Returns
          -------
          segdict : `~gwpy.segments.SegmentListDict`
              dict of ``(name, SegmentList)`` pairs