code: def repeat(
      x: Union[ivy.Array, ivy.NativeArray],
      /,
      repeats: Union[int, Iterable[int]],
      *,
      axis: Optional[int] = None,
      out: Optional[ivy.Array] = None,
  ) -> ivy.Array:
      """Repeat values along a given dimension.
  
      Parameters
      ----------
      x
          Input array.
      repeats
          The number of repetitions for each element. repeats is broadcast to fit the
          shape of the given axis.
      axis
          The axis along which to repeat values. By default, use the flattened input
          array, and return a flat output array.
      out
          optional output array, for writing the result to. It must have a shape that the
          inputs broadcast to.
  
      Returns
      -------
      ret
          The repeated output array.
  
  
      Both the description and the type hints above assumes an array input for simplicity,
      but this function is *nestable*, and therefore also accepts :class:`ivy.Container`
      instances in place of any of the arguments.
  
      Examples
      --------
      With :class:`ivy.Array` input:
  
      >>> x = ivy.array([3, 4, 5])
      >>> y = ivy.repeat(x, 2)
      >>> print(y)
      ivy.array([3, 3, 4, 4, 5, 5])
  
      >>> x = ivy.array([[1, 2, 3], [4, 5, 6]])
      >>> y = ivy.repeat(x, [1, 2], axis=0)
      >>> print(y)
      ivy.array([[1, 2, 3],
                 [4, 5, 6],
                 [4, 5, 6]])
  
      With :class:`ivy.Container` input:
  
      >>> x = ivy.Container(a=ivy.array([0., 1., 2.]),
      ...                   b=ivy.array([0., 1., 2.]))
      >>> y = ivy.repeat(x, 2, axis=0)
      >>> print(y)
      {
          a: ivy.array([0., 0., 1., 1., 2., 2.]),
          b: ivy.array([0., 0., 1., 1., 2., 2.])
      }
      """
      return current_backend(x).repeat(x, repeats, axis=axis, out=out)
  
imports: from typing import Union, Optional, Tuple, List, Iterable, Sequence
  from numbers import Number
  from numpy.core.numeric import normalize_axis_tuple
  import ivy
  from ivy.utils.backend import current_backend
  from ivy.func_wrapper import handle_array_function, to_native_arrays_and_back, handle_out_argument, handle_nestable, handle_array_like_without_promotion, handle_view, handle_device, handle_backend_invalid
  from ivy.utils.exceptions import handle_exceptions
label_desc: Use image node_id 12 for calling a global function with example usage: repeat(repeats) and returns: current_backend