code: def unique_counts(
      x: torch.Tensor, /
  ) -> Tuple[torch.Tensor, torch.Tensor]:
      v, c = torch.unique(torch.reshape(x, [-1]), return_counts=True)
      nan_idx = torch.where(torch.isnan(v))
      c[nan_idx] = 1
      Results = namedtuple("Results", ["values", "counts"])
      return Results(v, c)
  
file_path: ivy/ivy/functional/backends/torch/set.py
imports: import torch
  from typing import Tuple, Optional
  from collections import namedtuple
  from ivy.func_wrapper import with_unsupported_dtypes
  from .None import backend_version
  import ivy
label_desc: Use image node_id 2 for calling a global function with example usage: unique_counts() and returns: Results