code: def unique_counts(x: Array, /) -> UniqueCountsResult:
      res = np.unique(
          x._array,
          return_counts=True,
          return_index=False,
          return_inverse=False,
          equal_nan=False,
      )
  
      return UniqueCountsResult(*[Array._new(i) for i in res])
  
file_path: cupy/cupy/array_api/_set_functions.py
imports: from __future__ import annotations
  from ._array_object import Array
  from typing import NamedTuple
  import cupy
label_desc: Use image node_id 2 for calling a global function with example usage: unique_counts() and returns: UniqueCountsResult