code: def repeat(x, repeats, axis=None):
      """Construct an array by repeating a given array.
  
      Args:
          x (:class:`~chainer.Variable` or :ref:`ndarray`):
              Input variable.
          repeats (:class:`int` or :class:`tuple` of :class:`int` s):
              The number of times which each element of ``x`` is repeated.
          axis (:class:`int`):
              The axis along which to repeat values.
  
      Returns:
          ~chainer.Variable: The repeated output Variable.
  
      .. admonition:: Example
  
          >>> x = np.array([0, 1, 2])
          >>> x.shape
          (3,)
          >>> y = F.repeat(x, 2)
          >>> y.shape
          (6,)
          >>> y.array
          array([0, 0, 1, 1, 2, 2])
          >>> x = np.array([[1,2], [3,4]])
          >>> x.shape
          (2, 2)
          >>> y = F.repeat(x, 3, axis=1)
          >>> y.shape
          (2, 6)
          >>> y.array
          array([[1, 1, 1, 2, 2, 2],
                 [3, 3, 3, 4, 4, 4]])
          >>> y = F.repeat(x, (1, 2), axis=0)
          >>> y.shape
          (3, 2)
          >>> y.array
          array([[1, 2],
                 [3, 4],
                 [3, 4]])
  
      """
      return Repeat(repeats, axis).apply((x,))[0]
  
file_path: chainer/chainer/functions/array/repeat.py
imports: import six
  from chainer import backend
  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: repeat(x, repeats, axis) and returns: Repeat