code: def _process_autocomplete_results(
              self,
              results: pysolr.Results) -> Dict[str, List[AutocompleteResult]]:
          
          # map go-golr fields to standard
          for doc in results.docs:
              if 'entity' in doc:
                  doc['id'] = doc['entity']
                  doc['label'] = doc['entity_label']
  
          docs = []
          for doc in results.docs:
              if results.highlighting:
                  hl = self._process_highlight(results, doc)
              else:
                  hl = Highlight(None, None, None)
  
              # In some cases a node does not have a category
              category = doc['category'] if 'category' in doc else []
  
              doc['taxon'] = doc['taxon'] if 'taxon' in doc else ""
              doc['taxon_label'] = doc['taxon_label'] if 'taxon_label' in doc else ""
              doc = AutocompleteResult(
                  id=doc['id'],
                  label=doc['label'],
                  match=hl.match,
                  category=category,
                  taxon=doc['taxon'],
                  taxon_label=doc['taxon_label'],
                  highlight=hl.highlight,
                  has_highlight=hl.has_highlight
              )
              docs.append(doc)
  
          payload = {
              'docs': docs
          }
          logging.debug('Docs: {}'.format(len(results.docs)))
  
          return payload
docs: Convert results to biolink autocomplete object
          :param results: pysolr.Results
          :return: {'docs': List[AutocompleteResult]}