code: def unique_counts(
      x: paddle.Tensor, /
  ) -> Tuple[paddle.Tensor, paddle.Tensor]:
      unique, counts = paddle.unique(x, return_counts=True)
      nan_count = paddle.count_nonzero(
          paddle.where(paddle.isnan(x) > 0)
      ).numpy()[0]
  
      if nan_count > 0:
          unique_nan = paddle.full(
              shape=[1, nan_count], fill_value=float("nan")
          ).cast(x.dtype)
          counts_nan = paddle.full(
              shape=[1, nan_count], fill_value=1
          ).cast(x.dtype)
          unique = paddle.concat(
              [
                  unique.astype(x.dtype),
                  paddle.reshape(unique_nan, [nan_count]),
              ],
              axis=0,
          )
          counts = paddle.concat(
              [
                  counts.astype(x.dtype),
                  paddle.reshape(counts_nan, [nan_count]),
              ],
              axis=0,
          )
  
      Results = namedtuple("Results", ["values", "counts"])
      return Results(unique.cast(x.dtype), counts)
  
file_path: ivy/ivy/functional/backends/paddle/set.py
imports: import paddle
  from typing import Tuple, Optional
  from collections import namedtuple
  import ivy.functional.backends.paddle
  from ivy.func_wrapper import with_supported_dtypes
  from .None import backend_version
label_desc: Use image node_id 2 for calling a global function with example usage: unique_counts() and returns: Results