code: def load_glove(filename, emb_dim, normalize_digits=True):
      """Loads embeddings in the glove text format in which each line is
      '<word-string> <embedding-vector>'. Dimensions of the embedding vector
      are separated with whitespace characters.
  
      Args:
          filename (str): Path to the embedding file.
          vocab (dict): A dictionary that maps token strings to integer index.
              Tokens not in :attr:`vocab` are not read.
          word_vecs: A 2D numpy array of shape `[vocab_size, embed_dim]`
              which is updated as reading from the file.
  
      Returns:
          The updated :attr:`word_vecs`.
      """
      glove_dict = dict()
      with tf.gfile.Open(filename) as fin:
          for line in fin:
              vec = line.strip().split()
              if len(vec) == 0:
                  continue
              word, vec = vec[0], vec[1:]
              word = tf.compat.as_text(word)
              word = (
                  DIGIT_RE.sub("0", word) if normalize_digits else word
              )
              glove_dict[word] = np.array([float(v) for v in vec])
              if len(vec) != emb_dim:
                  raise ValueError(
                      "Inconsistent word vector sizes: %d vs %d"
                      % (len(vec), emb_dim)
                  )
      return glove_dict
  
imports: import re
  from collections import defaultdict
  import numpy
  import tensorflow
label_desc: Use image node_id 4 for calling a global function with example usage: load_glove(filename, emb_dim, normalize_digits) and returns: glove_dict