code: def query_segdb(cls, flag, *args, **kwargs):
          
          warnings.warn("query_segdb is deprecated and will be removed in a "
                        "future release", DeprecationWarning)
  
          # parse arguments
          qsegs = _parse_query_segments(args, cls.query_segdb)
  
          # process query
          try:
              flags = DataQualityDict.query_segdb([flag], qsegs, **kwargs)
          except TypeError as exc:
              if 'DataQualityDict' in str(exc):
                  raise TypeError(str(exc).replace('DataQualityDict',
                                                   cls.__name__))
              else:
                  raise
          if len(flags) > 1:
              raise RuntimeError("Multiple flags returned for single query, "
                                 "something went wrong:\n    %s"
                                 % '\n    '.join(flags.keys()))
          elif len(flags) == 0:
              raise RuntimeError("No flags returned for single query, "
                                 "something went wrong.")
          return flags[flag]
docs: Query the initial LIGO segment database for the given flag
  
          Parameters
          ----------
          flag : `str`
              The name of the flag for which to query
  
          *args
              Either, two `float`-like numbers indicating the
              GPS [start, stop) interval, or a `SegmentList`
              defining a number of summary segments
  
          url : `str`, optional
              URL of the segment database, defaults to
              ``$DEFAULT_SEGMENT_SERVER`` environment variable, or
              ``'https://segments.ligo.org'``
  
          Returns
          -------
          flag : `DataQualityFlag`
              A new `DataQualityFlag`, with the `known` and `active` lists
              filled appropriately.