code: def quantile(
      a: ivy.Array,
      q: Union[ivy.Array, float],
      /,
      *,
      axis: Optional[Union[Sequence[int], int]] = None,
      keepdims: bool = False,
      interpolation: str = "linear",
      out: Optional[ivy.Array] = None,
  ) -> ivy.Array:
      """Compute the q-th quantile of the data along the specified axis.
  
      Parameters
      ----------
      a
          Input array.
      q
          Quantile or sequence of quantiles to compute, which must be
          between 0 and 1 inclusive.
      axis
          Axis or axes along which the quantiles are computed. The default
          is to compute the quantile(s) along a flattened version of the array.
      keepdims
          If this is set to True, the axes which are reduced are left in the result
          as dimensions with size one. With this option, the result will broadcast
          correctly against the original array a.
      interpolation
          {'nearest', 'linear', 'lower', 'higher', 'midpoint', 'nearest_jax'}.
          Default value: 'linear'.
          This specifies the interpolation method to use when the desired quantile lies
          between two data points i < j:
          - linear: i + (j - i) * fraction, where fraction is the fractional part of the
          index surrounded by i and j.
          - lower: i.
          - higher: j.
          - nearest: i or j, whichever is nearest.
          - midpoint: (i + j) / 2. linear and midpoint interpolation do not work with
          integer dtypes.
          - nearest_jax: provides jax-like computation for interpolation='nearest'.
      out
          optional output array, for writing the result to.
  
      Returns
      -------
      ret
          A (rank(q) + N - len(axis)) dimensional array of same dtype as a, or, if axis
          is None, a rank(q) array. The first rank(q) dimensions index quantiles for
          different values of q.
  
      Examples
      --------
      >>> a = ivy.array([[10., 7., 4.], [3., 2., 1.]])
      >>> q = ivy.array(0.5)
      >>> ivy.quantile(a, q)
      ivy.array(3.5)
  
      >>> a = ivy.array([[10., 7., 4.], [3., 2., 1.]])
      >>> q = 0.5
      >>> ivy.quantile(a, q)
      ivy.array(3.5)
  
      >>> ivy.quantile(a, q, axis=0)
      ivy.array([6.5, 4.5, 2.5])
  
      >>> ivy.quantile(a, q, axis=1)
      ivy.array([7.,  2.])
  
      >>> ivy.quantile(a, q, axis=1, keepdims=True)
      ivy.array([[7.],[2.]])
  
      >>> a = ivy.array([1., 2., 3., 4.])
      >>> q = ivy.array([0.3, 0.7])
      >>> ivy.quantile(a, q, interpolation='lower')
      ivy.array([1., 3.])
      """
      return ivy.current_backend(a).quantile(
          a,
          q,
          axis=axis,
          keepdims=keepdims,
          interpolation=interpolation,
          out=out,
      )
  
file_path: ivy/ivy/functional/ivy/experimental/statistical.py
imports: from typing import Optional, Union, Tuple, Sequence
  import ivy
  from ivy.func_wrapper import handle_array_function, handle_out_argument, to_native_arrays_and_back, handle_array_like_without_promotion, handle_nestable, infer_dtype, handle_device, handle_backend_invalid
  from ivy.utils.exceptions import handle_exceptions
label_desc: Use image node_id 6 for calling a global function with example usage: quantile() and returns: ivy