code: def unique_all(x):
      """
      Returns the unique elements of an input array `x`
  
      Notes
      -----
      `unique_all` is a standard API in
      https://data-apis.org/array-api/latest/API_specification/set_functions.html#unique-all-x
      instead of an official NumPy operator.
  
      Parameters
      ----------
      x : ndarray
          Input array. This will be flattened if it is not already 1-D.
  
      Returns
      -------
      out : Tuple[ndarray, ndarray, ndarray, ndarray]
          a namedtuple (values, indices, inverse_indices, counts):
          values : ndarray
              The sorted unique values.
          indices : ndarray, optional
              The indices of the first occurrences of the unique values in the
              original array.
          inverse_indices : ndarray
              The indices to reconstruct the original array from the
              unique array.
          counts : ndarray
              The number of times each of the unique values comes up in the
              original array.
      """
      UniqueAll = namedtuple(
          "UniqueAll",
          ["values", "indices", "inverse_indices", "counts"],
      )
      return UniqueAll(*_mx_nd_np.unique(x, True, True, True))
  
imports: from collections import namedtuple
  from ..ndarray import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: unique_all(x) and returns: UniqueAll