code: def unique_inverse(
      x: JaxArray,
      /,
      *,
      axis: Optional[int] = None,
  ) -> Tuple[JaxArray, JaxArray]:
      Results = namedtuple("Results", ["values", "inverse_indices"])
      values, inverse_indices = jnp.unique(
          x, return_inverse=True, axis=axis
      )
  
      nan_count = jnp.count_nonzero(jnp.isnan(x))
      if nan_count > 1:
          values = jnp.append(
              values, jnp.full(nan_count - 1, jnp.nan), axis=0
          ).astype(x.dtype)
      inverse_indices = jnp.reshape(inverse_indices, x.shape)
  
      return Results(values, inverse_indices)
  
file_path: ivy/ivy/functional/backends/jax/set.py
imports: import jax.numpy
  from typing import Tuple, Optional
  from collections import namedtuple
  from ivy.functional.backends.jax import JaxArray
  import ivy
label_desc: Use image node_id 3 for calling a global function with example usage: unique_inverse() and returns: Results