code: def sequence_embed(embed, xs, dropout=0.0):
      """Efficient embedding function for variable-length sequences
  
      This output is equally to
      "return [F.dropout(embed(x), ratio=dropout) for x in xs]".
      However, calling the functions is one-shot and faster.
  
      Args:
          embed (callable): A :func:`~chainer.functions.embed_id` function
              or :class:`~chainer.links.EmbedID` link.
          xs (list of :class:`~chainer.Variable` or :class:`numpy.ndarray` or \
          :class:`cupy.ndarray`): i-th element in the list is an input variable,
              which is a :math:`(L_i, )`-shaped int array.
          dropout (float): Dropout ratio.
  
      Returns:
          list of ~chainer.Variable: Output variables. i-th element in the
          list is an output variable, which is a :math:`(L_i, N)`-shaped
          float array. :math:`(N)` is the number of dimensions of word embedding.
  
      """
      x_len = [len(x) for x in xs]
      x_section = numpy.cumsum(x_len[:-1])
      ex = embed(F.concat(xs, axis=0))
      ex = F.dropout(ex, ratio=dropout)
      exs = F.split_axis(ex, x_section, 0)
      return exs
  
imports: import numpy
  import chainer
  import chainer.functions
  import chainer.links
  from chainer import reporter
label_desc: Use image node_id 1 for calling a global function with example usage: sequence_embed(embed, xs, dropout) and returns: exs