code: def unique_inverse(x: Array, /) -> UniqueInverseResult:
      """
      Array API compatible wrapper for :py:func:`np.unique <numpy.unique>`.
  
      See its docstring for more information.
      """
      values, inverse_indices = np.unique(
          x._array,
          return_counts=False,
          return_index=False,
          return_inverse=True,
          equal_nan=False,
      )
      # np.unique() flattens inverse indices, but they need to share x's shape
      # See https://github.com/numpy/numpy/issues/20638
      inverse_indices = inverse_indices.reshape(x.shape)
      return UniqueInverseResult(
          Array._new(values), Array._new(inverse_indices)
      )
  
file_path: catboost/contrib/python/numpy/py3/numpy/array_api/_set_functions.py
imports: from __future__ import annotations
  from ._array_object import Array
  from typing import NamedTuple
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: unique_inverse() and returns: UniqueInverseResult