code: def unique_values(
      x: JaxArray, /, *, out: Optional[JaxArray] = None
  ) -> JaxArray:
      nan_count = jnp.count_nonzero(jnp.isnan(x))
      if nan_count > 1:
          unique = jnp.append(
              jnp.unique(x.flatten()), jnp.full(nan_count - 1, jnp.nan)
          ).astype(x.dtype)
      else:
          unique = jnp.unique(x.flatten()).astype(x.dtype)
      return unique
  
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 4 for calling a global function with example usage: unique_values() and returns: unique