code: def pad_sequence(xs, length=None, padding=0):
      """Pad given arrays to make a matrix.
  
      Args:
          xs (list of ~chainer.Variable or :ref:`ndarray`):
              Variables you want to concatenate.
          length (None or int): Size of the first dimension of a padded array.
              If it is ``None``, the longest size of the first dimension of
              ``xs`` is used.
          padding (int or float): Value to fill.
  
      Returns:
          ~chainer.Variable: A padded matrix. Its shape is
          ``(n, length, ...)``, where ``n == len(xs)``.
  
      """
      return PadSequence(length, padding).apply((xs))[0]
  
file_path: chainer/chainer/functions/array/pad_sequence.py
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: pad_sequence(xs, length, padding) and returns: PadSequence