code: def embedding(_input, vocab_size, embedding_dim, name="embedding"):
      """
      _input: [batch_size, max_num_steps]
      output: [batch_size, max_num_steps, embedding_dim]
      """
      # embedding
      embedding_var = tf.get_variable(
          name=name,
          shape=[vocab_size, embedding_dim],
          initializer=tf.random_uniform_initializer(
              -np.sqrt(3), np.sqrt(3)
          ),
          dtype=tf.float32,
      )  # Initialize embeddings to have variance=1.
      output = tf.nn.embedding_lookup(embedding_var, _input)
      return output
  
imports: import tensorflow
  from tensorflow.contrib import rnn
  from tensorflow.python.ops import array_ops
  from ..models.basic_model import BasicModel
  import numpy
  import os
label_desc: Use image node_id 1 for calling a global function with example usage: embedding(_input, vocab_size, embedding_dim, name) and returns: output