code: def create_embeddings(dictionary, embedding_size, padding_idx):
      """
      Create and initialize word embeddings.
      """
      e = nn.Embedding(len(dictionary), embedding_size, padding_idx)
      nn.init.normal_(e.weight, mean=0, std=embedding_size**-0.5)
      nn.init.constant_(e.weight[padding_idx], 0)
      return e
  
imports: import numpy
  import torch
  import torch.nn
  from parlai.core.opt import Opt
label_desc: Use image node_id 2 for calling a global function with example usage: create_embeddings(dictionary, embedding_size, padding_idx) and returns: e