code: def quantile(
      a: ArrayLike,
      q: ArrayLike,
      axis: AxisLike = None,
      out: Optional[OutArray] = None,
      overwrite_input=False,
      method="linear",
      keepdims: KeepDims = False,
      *,
      interpolation: NotImplementedType = None,
  ):
      if overwrite_input:
          # raise NotImplementedError("overwrite_input in quantile not implemented.")
          # NumPy documents that `overwrite_input` MAY modify inputs:
          # https://numpy.org/doc/stable/reference/generated/numpy.percentile.html#numpy-percentile
          # Here we choose to work out-of-place because why not.
          pass
  
      if not a.dtype.is_floating_point:
          dtype = _dtypes_impl.default_dtypes().float_dtype
          a = a.to(dtype)
  
      # edge case: torch.quantile only supports float32 and float64
      if a.dtype == torch.float16:
          a = a.to(torch.float32)
  
      if axis is None:
          a = a.flatten()
          q = q.flatten()
          axis = (0,)
      else:
          axis = _util.normalize_axis_tuple(axis, a.ndim)
  
      # FIXME(Mario) Doesn't np.quantile accept a tuple?
      # torch.quantile does accept a number. If we don't want to implement the tuple behaviour
      # (it's deffo low prio) change `normalize_axis_tuple` into a normalize_axis index above.
      axis = _util.allow_only_single_axis(axis)
  
      q = _util.cast_if_needed(q, a.dtype)
  
      return torch.quantile(a, q, axis=axis, interpolation=method)
  
imports: from __future__ import annotations
  import functools
  from typing import Optional
  import torch
  from .None import _dtypes_impl, _util
  from ._normalizations import ArrayLike, AxisLike, DTypeLike, KeepDims, NotImplementedType, OutArray
label_desc: Use image node_id 19 for calling a global function with example usage: quantile(a, q, axis, out, overwrite_input, method, keepdims) and returns: torch