code: def get_pages(self, phrase):
      if phrase in self.cache:
          return self.cache[phrase]
      try:
          phrase_strip = " ".join(phrase.replace("-", " ").split())
          pages = set()
          best_results = self.get_best_elastic_results(phrase_strip)
          for result in best_results:
              _id = result["_id"]
              if _id != 0:
                  result_source = result["_source"]
                  if "redirectTitle" in result_source:
                      redirect_title = result_source["redirectTitle"]
                      red_result = None
                      while (
                          redirect_title
                          and result_source["title"] != redirect_title
                      ):
                          red_result = self.get_redirect_result(
                              redirect_title
                          )
                          if red_result is None or len(red_result) == 0:
                              print(
                                  "could not find redirect title="
                                  + redirect_title
                                  + ", does not exist in data"
                              )
                              redirect_title = None
                          elif (
                              "redirectTitle"
                              in red_result[0]["_source"]
                          ):
                              redirect_title = red_result[0]["_source"][
                                  "redirectTitle"
                              ]
                          else:
                              redirect_title = None
  
                      if red_result is not None and len(red_result) > 0:
                          result = red_result[0]
                          _id = result["_id"]
  
                  elastic_page_result = self.get_page_from_result_v1(
                      phrase_strip, result, _id
                  )
                  pages.add(
                      WikipediaSearchPageResult(
                          phrase, elastic_page_result
                      )
                  )
  
          self.cache[phrase] = pages
          return pages
      except Exception:
          traceback.print_exc()
  
file_path: nlp-architect/nlp_architect/data/cdc_resources/wikipedia/wiki_elastic.py
imports: import logging
  import sys
  import traceback
  import requests
  from nlp_architect.data.cdc_resources.data_types.wiki.wikipedia_page import WikipediaPage
  from nlp_architect.data.cdc_resources.data_types.wiki.wikipedia_page_extracted_relations import WikipediaPageExtractedRelations
  from nlp_architect.data.cdc_resources.wikipedia.wiki_search_page_result import WikipediaSearchPageResult
label_desc: Use image node_id 3 for calling the WikiElastic obj's underlying member method code with example usage: obj.get_pages(phrase) and returns: self, pages