code: def wiki_dump_from_gs():
      logger.info(
          "Starting, process will connect with ElasticSearch and online wikipedia site..."
      )
      mentions_files = [args.mentions]
      dump_file = args.output
      vocab = load_mentions_vocab_from_files(mentions_files)
  
      if args.host and args.port and args.index:
          wiki_elastic = WikipediaRelationExtraction(
              WikipediaSearchMethod.ELASTIC,
              host=args.host,
              port=args.port,
              index=args.index,
          )
      else:
          logger.info(
              "Running without Wikipedia elastic search, Note that this will "
              "take much longer to process only using online service"
          )
          wiki_elastic = None
  
      wiki_online = WikipediaRelationExtraction(
          WikipediaSearchMethod.ONLINE
      )
  
      for phrase in vocab:
          phrase = (
              phrase.replace("'", "")
              .replace('"', "")
              .replace("\\", "")
              .strip()
          )
          logger.info(
              "Try to retrieve '%s' from elastic search", phrase
          )
          pages = None
          if wiki_elastic:
              pages = wiki_elastic.get_phrase_related_pages(phrase)
          if (
              not pages
              or not pages.get_pages()
              or len(pages.get_pages()) == 0
          ):
              logger.info(
                  "Not on elastic, retrieve '%s' from wiki online site",
                  phrase,
              )
              pages = wiki_online.get_phrase_related_pages(phrase)
          for search_page in pages.get_pages():
              add_page(search_page, phrase)
  
      with open(dump_file, "w") as myfile:
          json.dump(result_dump, myfile, default=json_dumper)
  
      logger.info("Saving dump to file-%s", dump_file)
  
file_path: nlp-architect/nlp_architect/data/cdc_resources/gen_scripts/create_wiki_dump.py
imports: import argparse
  import json
  import logging
  from nlp_architect.data.cdc_resources.relations.relation_types_enums import WikipediaSearchMethod
  from nlp_architect.data.cdc_resources.relations.wikipedia_relation_extraction import WikipediaRelationExtraction
  from nlp_architect.models.cross_doc_coref.system.cdc_utils import load_mentions_vocab_from_files
  from nlp_architect.utils import io
  from nlp_architect.utils.io import json_dumper
label_desc: Use image node_id 1 for calling a global function with example usage: wiki_dump_from_gs() without return types