code: def roll(
      x: Union[ivy.Array, ivy.NativeArray, ivy.Container],
      /,
      shift: Union[int, Sequence[int]],
      *,
      axis: Optional[Union[int, Sequence[int]]] = None,
      out: Optional[ivy.Array] = None,
  ) -> Union[ivy.Array, ivy.Container]:
      """Roll array elements along a specified axis. Array elements that roll
      beyond the last position are re-introduced at the first position. Array
      elements that roll beyond the first position are re-introduced at the last
      position.
  
      Parameters
      ----------
      x
          input array.
      shift
          number of places by which the elements are shifted. If shift is a tuple,
          then axis must be a tuple of the same size, and each of the given axes must
          be shifted by the corresponding element in shift. If shift is an int
          and axis a tuple, then the same shift must be used for all specified
          axes. If a shift is positive, then array elements must be shifted positively
          (toward larger indices) along the dimension of axis. If a shift is negative,
          then array elements must be shifted negatively (toward smaller indices) along
          the dimension of axis.
      axis
          axis (or axes) along which elements to shift. If axis is None, the array
          must be flattened, shifted, and then restored to its original shape.
          Default: ``None``.
      out
          optional output array, for writing the result to. It must have a shape that the
          inputs broadcast to.
  
      Returns
      -------
      ret
          an output array having the same data type as x and whose elements, relative
          to x, are shifted.
  
  
      This function conforms to the `Array API Standard
      <https://data-apis.org/array-api/latest/>`_. This docstring is an extension of the
      `docstring <https://data-apis.org/array-api/latest/
      API_specification/generated/array_api.roll.html>`_
      in the standard.
  
      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([0., 1., 2.])
      >>> y = ivy.roll(x, 1)
      >>> print(y)
      ivy.array([2., 0., 1.])
  
      >>> x = ivy.array([[0., 1., 2.],
      ...                [3., 4., 5.]])
      >>> y = ivy.zeros((2, 3))
      >>> ivy.roll(x, 2, axis=-1, out=y)
      >>> print(y)
      ivy.array([[1., 2., 0.],
                 [4., 5., 3.]])
  
      >>> x = ivy.array([[[0., 0.], [1., 3.], [2., 6.]],
      ...                [[3., 9.], [4., 12.], [5., 15.]]])
      >>> ivy.roll(x, shift=(1, -1), axis=(0, 2), out=x)
      >>> print(x)
      ivy.array([[[ 9., 3.],
                  [12., 4.],
                  [15., 5.]],
                 [[ 0., 0.],
                  [ 3., 1.],
                  [ 6., 2.]]])
  
      With one :class:`ivy.Container` input:
  
      >>> x = ivy.Container(a=ivy.array([0., 1., 2.]),
      ...                   b=ivy.array([3., 4., 5.]))
      >>> y = ivy.roll(x, 1)
      >>> print(y)
      {
          a: ivy.array([2., 0., 1.]),
          b: ivy.array([5., 3., 4.])
      }
  
      With multiple :class:`ivy.Container` inputs:
  
      >>> x = ivy.Container(a=ivy.array([0., 1., 2.]),
      ...                   b=ivy.array([3., 4., 5.]))
      >>> shift = ivy.Container(a=1, b=-1)
      >>> y = ivy.roll(x, shift)
      >>> print(y)
      {
          a: ivy.array([2., 0., 1.]),
          b: ivy.array([4., 5., 3.])
      }
      """
      return current_backend(x).roll(x, shift, 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 7 for calling a global function with example usage: roll(shift) and returns: current_backend