code: def unique_consecutive(
      x: torch.Tensor,
      /,
      *,
      axis: Optional[int] = None,
  ) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor]:
      Results = namedtuple(
          "Results",
          ["output", "inverse_indices", "counts"],
      )
      output, inverse_indices, counts = torch.unique_consecutive(
          x,
          return_inverse=True,
          return_counts=True,
          dim=axis,
      )
      return Results(
          output.to(x.dtype),
          inverse_indices,
          counts,
      )
  
imports: from typing import Iterable, Optional, Union, Sequence, Tuple, NamedTuple, List, Literal, Callable, Any
  from numbers import Number
  from collections import namedtuple
  import torch
  from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
  from ..None import backend_version
  import ivy
  from ivy.functional.ivy.experimental.manipulation import _to_tf_padding, _check_paddle_pad, _to_paddle_padding
label_desc: Use image node_id 23 for calling a global function with example usage: unique_consecutive() and returns: Results