code: def embed_id(x, W, ignore_label=None):
      """Efficient linear function for one-hot input.
  
      This function implements so called *word embeddings*. It takes two
      arguments: a set of IDs (words) ``x`` in :math:`B` dimensional integer
      vector, and a set of all ID (word) embeddings ``W`` in :math:`V \\times d`
      float matrix. It outputs :math:`B \\times d` matrix whose ``i``-th
      row is the ``x[i]``-th row of ``W``.
  
      This function is only differentiable on the input ``W``.
  
      Args:
          x (:class:`~chainer.Variable` or :ref:`ndarray`):
              Batch vectors of IDs. Each element must be signed integer.
          W (:class:`~chainer.Variable` or :ref:`ndarray`):
              Distributed representation of each ID (a.k.a. word embeddings).
          ignore_label (:class:`int` or :class:`None`):
              If ``ignore_label`` is an int value, ``i``-th row of return
              value is filled with ``0``.
  
      Returns:
          ~chainer.Variable: Output variable.
  
      .. seealso::
  
          :class:`~chainer.links.EmbedID` to manage the model parameter ``W``.
  
      .. admonition:: Example
  
          >>> x = np.array([2, 1]).astype(np.int32)
          >>> x
          array([2, 1], dtype=int32)
          >>> W = np.array([[0, 0, 0],
          ...               [1, 1, 1],
          ...               [2, 2, 2]]).astype(np.float32)
          >>> W
          array([[0., 0., 0.],
                 [1., 1., 1.],
                 [2., 2., 2.]], dtype=float32)
          >>> F.embed_id(x, W).array
          array([[2., 2., 2.],
                 [1., 1., 1.]], dtype=float32)
          >>> F.embed_id(x, W, ignore_label=1).array
          array([[2., 2., 2.],
                 [0., 0., 0.]], dtype=float32)
  
      """
      return EmbedIDFunction(ignore_label=ignore_label).apply((x, W))[0]
  
imports: import numpy
  import six
  import chainer
  from chainer import backend
  from chainer.backends import cuda
  from chainer import function_node
  from chainer import utils
  from chainer.utils import type_check
label_desc: Use image node_id 1 for calling a global function with example usage: embed_id(x, W, ignore_label) and returns: EmbedIDFunction