code: def expand_dims(
      x: Union[ivy.Array, ivy.NativeArray],
      /,
      *,
      copy: Optional[bool] = None,
      axis: Union[int, Sequence[int]] = 0,
      out: Optional[ivy.Array] = None,
  ) -> ivy.Array:
      """Expand the shape of an array by inserting a new axis (dimension) of size
      one at the position specified by axis.
  
      Parameters
      ----------
      x
          input array.
      copy
          boolean indicating whether or not to copy the input array.
          If True, the function must always copy.
          If False, the function must never copy.
          In case copy is False we avoid copying by returning a view of the input array.
      axis
          axis position (zero-based). If x has rank (i.e, number of dimensions) N, a
          valid axis must reside on the closed-interval [-N-1, N]. If provided a negative
          axis, the axis position at which to insert a singleton dimension is
          computed as N + axis + 1. Hence, if provided -1, the resolved axis position
          is N (i.e., a singleton dimension is appended to the input array x).
          If provided -N-1, the resolved axis position is 0 (i.e., a singleton
          dimension is prepended to the input array x). An IndexError exception
          is raised if provided an invalid axis position.
      out
          optional output array, for writing the result to. It must have a shape that the
          inputs broadcast to.
  
      Returns
      -------
      ret
          an array with its dimension added by one in a given axis.
  
  
      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.expand_dims.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.expand_dims(x)
      >>> print(y)
      ivy.array([[0, 1, 2]])
  
      >>> x = ivy.array([[0.5, -0.7, 2.4],
      ...                [  1,    2,   3]])
      >>> y = ivy.zeros((2, 1, 3))
      >>> ivy.expand_dims(x, axis=1, out=y)
      >>> print(y)
      ivy.array([[[0.5, -0.7, 2.4]],
                 [[ 1.,   2.,  3.]]])
  
      >>> x = ivy.array([[-1, -2],
      ...                [ 3,  4]])
      >>> y = ivy.zeros((1, 2, 2))
      >>> ivy.expand_dims(x, axis=0, out=y)
      >>> print(y)
      ivy.array([[[-1, -2],
                  [3,  4]]])
  
      >>> x = ivy.array([[-1.1, -2.2, 3.3],
      ...                [ 4.4,  5.5, 6.6]])
      >>> y = ivy.expand_dims(x, axis=(0, -1))
      >>> print(y)
      ivy.array([[[[-1.1],
                   [-2.2],
                   [ 3.3]],
                  [[ 4.4],
                   [ 5.5],
                   [ 6.6]]]])
  
      >>> x = ivy.array([[-1.7, -3.2, 2.3],
      ...                [ 6.3,  1.4, 5.7]])
      >>> y = ivy.expand_dims(x, axis=[0, 1, -1])
      >>> print(y)
      ivy.array([[[[[-1.7],
                    [-3.2],
                    [ 2.3]],
                   [[ 6.3],
                    [ 1.4],
                    [ 5.7]]]]])
  
      With one :class:`ivy.Container` input:
  
      >>> x = ivy.Container(a=ivy.array([0., 1., 2.]),
      ...                   b=ivy.array([3., 4., 5.]))
      >>> y = ivy.expand_dims(x, axis=-1)
      >>> print(y)
      {
          a: ivy.array([[0.],
                        [1.],
                        [2.]]),
          b: ivy.array([[3.],
                        [4.],
                        [5.]])
      }
  
      With multiple :class:`ivy.Container` inputs:
  
      >>> x = ivy.Container(a=ivy.array([0., 1., 2.]),
      ...                   b=ivy.array([3., 4., 5.]))
      >>> container_axis = ivy.Container(a=0, b=1)
      >>> y = ivy.expand_dims(x, axis=container_axis)
      >>> print(y)
      {
          a: ivy.array([[0., 1., 2.]]),
          b: ivy.array([[3.],
                        [4.],
                        [5.]])
      }
      """
      return current_backend(x).expand_dims(
          x, copy=copy, 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 3 for calling a global function with example usage: expand_dims() and returns: current_backend