code: def load_glove_for_vocab(glove_filename, vocabulary):
      vocab = []
      embd = []
      with open(glove_filename) as glove_file:
          for line in glove_file:
              row = line.strip().split(" ")
              word = row[0]
              if word in vocabulary:
                  vocab.append(word)
                  embd.append(row[1:])
      logger.info("Loaded GloVe!")
  
      embeddings = np.asarray(embd, dtype=float)
      word_to_ix = {word: i for i, word in enumerate(vocab)}
      return word_to_ix, embeddings
  
file_path: nlp-architect/nlp_architect/data/cdc_resources/gen_scripts/create_word_embed_glove_dump.py
imports: import argparse
  import logging
  import pickle
  import numpy
  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: load_glove_for_vocab(glove_filename, vocabulary) and returns: word_to_ix,  embeddings