code: def stack(
      arrays: Union[
          Tuple[Union[ivy.Array, ivy.NativeArray], ...],
          List[Union[ivy.Array, ivy.NativeArray]],
      ],
      /,
      *,
      axis: int = 0,
      out: Optional[ivy.Array] = None,
  ) -> ivy.Array:
      """Join a sequence of arrays along a new axis.
  
      Parameters
      ----------
      arrays
          input arrays to join. Each array must have the same shape.
      axis
          axis along which the arrays will be joined. Providing an axis specifies the
          index of the new axis in the dimensions of the result. For example, if axis
          is 0, the new axis will be the first dimension and the output array will
          have shape (N, A, B, C); if axis is 1, the new axis will be the
          second dimension and the output array will have shape (A, N, B, C); and, if
          axis is -1, the new axis will be the last dimension and the output array
          will have shape (A, B, C, N). A valid axis must be on the interval
          [-N, N), where N is the rank (number of dimensions) of x. If
          provided an axis outside of the required interval, the function must raise
          an exception. Default: ``0``.
      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 rank N+1, where N is the rank (number of
          dimensions) of x. If the input arrays have different data types, normal
          ref:`type-promotion` must apply. If the input arrays have the same data type,
          the output array must have the same data type as the input arrays.
          .. note::
             This specification leaves type promotion between data type families (i.e.,
             intxx and floatxx) unspecified.
  
  
      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.stack.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 :code: `ivy.Array` input:
  
      >>> x = ivy.array([0., 1., 2., 3., 4.])
      >>> y = ivy.array([6.,7.,8.,9.,10.])
      >>> ivy.stack((x,y))
      ivy.array([[ 0.,  1.,  2.,  3.,  4.],
          [ 6.,  7.,  8.,  9., 10.]])
  
      With :code: `ivy.Array` input and different `axis` :
  
      >>> ivy.stack((x,y),axis=1)
      ivy.array([[ 0.,  6.],
          [ 1.,  7.],
          [ 2.,  8.],
          [ 3.,  9.],
          [ 4., 10.]])
      """
      res = current_backend(arrays).stack(arrays, axis=axis, out=out)
      if ivy.exists(out):
          return ivy.inplace_update(out, res)
      return res
  
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 9 for calling a global function with example usage: stack() and returns: res, ivy