code: def load_word_embeddings(file_path, vocab=None):
      """
      Loads a word embedding model text file into a word(str) to numpy vector dictionary
  
      Args:
          file_path (str): path to model file
          vocab (list of str): optional - vocabulary
  
      Returns:
          list: a dictionary of numpy.ndarray vectors
          int: detected word embedding vector size
      """
      with open(file_path, encoding="utf-8") as fp:
          word_vectors = {}
          size = None
          for line in fp:
              line_fields = line.split()
              if len(line_fields) < 5:
                  continue
              if line[0] == " ":
                  word_vectors[" "] = np.asarray(
                      line_fields, dtype="float32"
                  )
              elif vocab is None or line_fields[0] in vocab:
                  word_vectors[line_fields[0]] = np.asarray(
                      line_fields[1:], dtype="float32"
                  )
                  if size is None:
                      size = len(line_fields[1:])
      return word_vectors, size
  
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 1 for calling a global function with example usage: load_word_embeddings(file_path, vocab) and returns: word_vectors,  size