code: def display_results(text_str, predictions, intent_type):
      ret = {
          "annotation_set": [],
          "doc_text": " ".join([t for t in text_str]),
      }
      spans = []
      available_tags = set()
      for s, e, tag in bio_to_spans(text_str, predictions):
          spans.append({"start": s, "end": e, "type": tag})
          available_tags.add(tag)
      ret["annotation_set"] = list(available_tags)
      ret["spans"] = spans
      ret["title"] = intent_type
      return {"doc": ret, "type": "high_level"}
  
file_path: nlp-architect/nlp_architect/api/intent_extraction_api.py
imports: import numpy
  import pickle
  from os import makedirs, path, sys
  from nlp_architect.api.abstract_api import AbstractApi
  from nlp_architect.models.intent_extraction import MultiTaskIntentModel, Seq2SeqIntentModel
  from nlp_architect import LIBRARY_OUT
  from nlp_architect.utils.generic import pad_sentences
  from nlp_architect.utils.io import download_unlicensed_file
  from nlp_architect.utils.text import SpacyInstance, bio_to_spans
label_desc: Use image node_id 5 for calling the IntentExtractionApi obj's underlying member method code with example usage: obj.display_results(text_str, predictions, intent_type) and returns: dict