code: def ref_dict_dump():
      logger.info(
          "Extracting referent dict dump, this may take a while..."
      )
      ref_dict_file = args.ref_dict
      out_file = args.output
      mentions_entity_gold_file = [args.mentions]
      vocab = load_mentions_vocab_from_files(
          mentions_entity_gold_file, True
      )
  
      ref_dict = ReferentDictRelationExtraction.load_reference_dict(
          ref_dict_file
      )
  
      ref_dict_for_vocab = {}
      for word in vocab:
          if word in ref_dict:
              ref_dict_for_vocab[word] = ref_dict[word]
  
      logger.info(
          "Found %d words from vocabulary",
          len(ref_dict_for_vocab.keys()),
      )
      logger.info("Preparing to save refDict output file")
      with open(out_file, "w") as f:
          json.dump(ref_dict_for_vocab, f)
      logger.info("Done saved to-%s", out_file)
  
imports: import argparse
  import json
  import logging
  from nlp_architect.data.cdc_resources.relations.referent_dict_relation_extraction import ReferentDictRelationExtraction
  from nlp_architect.models.cross_doc_coref.system.cdc_utils import load_mentions_vocab_from_files
  from nlp_architect.utils import io
label_desc: Use image node_id 1 for calling a global function with example usage: ref_dict_dump() without return types