code: def unique_consecutive(
      x: paddle.Tensor,
      /,
      *,
      axis: Optional[int] = None,
  ) -> Tuple[paddle.Tensor, paddle.Tensor, paddle.Tensor]:
      Results = namedtuple(
          "Results",
          ["output", "inverse_indices", "counts"],
      )
      x_shape = None
      if axis is None:
          x_shape = x.shape
          x = x.flatten()
          axis = -1
      if axis < 0:
          axis += x.ndim
      split_indices = paddle.flatten(
          paddle.where(
              ivy.current_backend().any(
                  paddle.abs(paddle.diff(x, axis=axis)) > 1e-50,
                  axis=tuple(
                      i for i in paddle.arange(x.ndim) if i != axis
                  ),
              )
          )[0]
          + 1,
      )
      if len(split_indices) > 0:
          split_sizes = (
              [split_indices[0]]
              + [
                  split_indices[i] - split_indices[i - 1]
                  for i in range(1, len(split_indices))
              ]
              + [x.shape[axis] - split_indices[-1]]
          )
          sub_arrays = paddle.split(
              x,
              split_sizes,
              axis=axis,
          )
      else:
          sub_arrays = [x]
      output = paddle.concat(
          [
              ivy.current_backend().unique_all(sub_array, axis=axis)[0]
              for sub_array in sub_arrays
          ],
          axis=axis,
      )
      counts = paddle.to_tensor(
          [sub_array.shape[axis] for sub_array in sub_arrays]
      )
      inverse_indices = paddle.repeat_interleave(
          paddle.arange(len(counts)), counts
      )
      if x_shape:
          inverse_indices = paddle.reshape(inverse_indices, x_shape)
      return Results(
          output.astype(x.dtype),
          inverse_indices,
          counts,
      )
  
imports: from collections import namedtuple
  from typing import Iterable, Optional, Union, Sequence, Tuple, NamedTuple, List, Any, Literal, Callable
  from numbers import Number
  from ..None import backend_version
  from ivy.func_wrapper import with_supported_device_and_dtypes, with_unsupported_device_and_dtypes, with_supported_dtypes, with_unsupported_dtypes
  import paddle
  import ivy
  import ivy.functional.backends.paddle
  from ivy.functional.ivy.experimental.manipulation import _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