docs: def getDocumentIDs(aleph_search_result, number_of_docs=-1):
      """
      Get IDs, which can be used as parameters for other functions.
  
      Args:
          aleph_search_result (dict): returned from :func:`searchInAleph`
          number_of_docs (int, optional): how many :class:`DocumentID` from set
                            given by `aleph_search_result` should be returned.
                            Default -1 for all of them.
  
      Returns:
          list: :class:`DocumentID` named tuples to given `aleph_search_result`.
  
      Raises:
          AlephException: If Aleph returns unknown format of data.
  
      Note:
          Returned :class:`DocumentID` can be used as parameters to
          :func:`downloadMARCXML`.
      """
      downer = Downloader()
  
      if "set_number" not in aleph_search_result:
          return []
  
      # set numbers should be probably aligned to some length
      set_number = str(aleph_search_result["set_number"])
      if len(set_number) < 6:
          set_number = (6 - len(set_number)) * "0" + set_number
  
      # limit number of fetched documents, if -1, download all
      if number_of_docs <= 0:
          number_of_docs = aleph_search_result["no_entries"]
  
      # download data about given set
      set_data = downer.download(
          ALEPH_URL + Template(SET_URL_TEMPLATE).substitute(
              SET_NUMBER=set_number,
              NUMBER_OF_DOCS=number_of_docs,
          )
      )
  
      # parse data
      dom = dhtmlparser.parseString(set_data)
      set_data = dom.find("ill-get-set")
  
      # there should be at least one <ill-get-set> field
      if len(set_data) <= 0:
          raise AlephException("Aleph didn't returned set data.")
  
      ids = []
      for library in set_data:
          documents = _alephResultToDict(library)
  
          if "error" in documents:
              raise AlephException("getDocumentIDs: " + documents["error"])
  
          # convert all document records to DocumentID named tuple and extend
          # them to 'ids' array
          if isinstance(documents["doc-number"], list):
              ids.extend(
                  map(
                      lambda x: DocumentID(
                          x,
                          documents["set-library"],
                          aleph_search_result["base"]
                      ),
                      set(documents["doc-number"])
                  )
              )
          else:
              ids.append(
                  DocumentID(
                      documents["doc-number"],
                      documents["set-library"],
                      aleph_search_result["base"]
                  )
              )
  
      return ids