code: def load_embedding_file(filename: str, dim: int = None) -> dict:
      """Load a word embedding file
  
      Args:
          filename (str): path to embedding file
  
      Returns:
          dict: dictionary with embedding vectors
      """
      if filename is not None and os.path.exists(filename):
          logger.info(
              "Loading external word embeddings from {}".format(
                  filename
              )
          )
      embedding_dict = {}
      with open(filename, encoding="utf-8") as fp:
          for line in fp:
              split_line = line.split()
              word = split_line[0]
              vec = np.array([float(val) for val in split_line[1:]])
              embedding_dict[word] = vec
      return embedding_dict
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import os
  import sys
  from typing import List
  import numpy
  from gensim.models import FastText
  from nlp_architect.utils.text import Vocabulary
label_desc: Use image node_id 4 for calling a global function with example usage: load_embedding_file(filename, dim) and returns: embedding_dict