code: def sort(
      x: Array,
      /,
      *,
      axis: int = -1,
      descending: bool = False,
      stable: bool = True,
  ) -> Array:
      """
      Array API compatible wrapper for :py:func:`np.sort <numpy.sort>`.
  
      See its docstring for more information.
      """
      if x.dtype not in _real_numeric_dtypes:
          raise TypeError(
              "Only real numeric dtypes are allowed in sort"
          )
      # Note: this keyword argument is different, and the default is different.
      kind = "stable" if stable else "quicksort"
      res = np.sort(x._array, axis=axis, kind=kind)
      if descending:
          res = np.flip(res, axis=axis)
      return Array._new(res)
  
imports: from __future__ import annotations
  from ._array_object import Array
  from ._dtypes import _real_numeric_dtypes
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: sort() and returns: Array