code: def get_embeddings(lookup_layer, word_idict):
      """
      Extract RNN embeddings from the lookup layer of the model
  
      Function modified from:
      https://github.com/ryankiros/skip-thoughts/blob/master/training/tools.py
      """
      f_emb = lookup_layer.W.get()
      d = OrderedDict()
      for i in range(f_emb.shape[0]):
          ff = f_emb[i].flatten()
          d[word_idict[i]] = ff
      return d
  
imports: import os
  import numpy
  from collections import defaultdict, OrderedDict
  from neon.layers import LookupTable, RecurrentSum, RecurrentLast, Linear, Bias, GeneralizedCost
  from neon.initializers import Gaussian, Constant
  from neon.data import ArrayIterator
  from neon.data.text_preprocessing import clean_string
  from neon.optimizers import GradientDescentMomentum
  from neon.transforms import SumSquared
  from neon.callbacks.callbacks import Callbacks
  from neon.models import Model
  from neon.util.persist import load_obj, save_obj
  from neon import logger
label_desc: Use image node_id 6 for calling a global function with example usage: get_embeddings(lookup_layer, word_idict) and returns: d