code: def cummax(
      x: paddle.Tensor,
      /,
      *,
      axis: int = 0,
      exclusive: bool = False,
      reverse: bool = False,
      dtype: Optional[paddle.dtype] = None,
      out: Optional[paddle.Tensor] = None,
  ) -> Tuple[paddle.Tensor, paddle.Tensor]:
      if x.dtype in (paddle.complex128, paddle.complex64):
          x = x.real()
  
      if not (exclusive or reverse):
          return __find_cummax(x, axis=axis)
  
      elif exclusive and reverse:
          x, indices = __find_cummax(
              ivy.flip(x, axis=(axis,)), axis=axis
          )
          x, indices = ivy.swapaxes(x, axis, -1), ivy.swapaxes(
              indices, axis, -1
          )
          x = ivy.concat(
              (ivy.zeros_like(x[..., -1:]), x[..., :-1]), axis=-1
          )
          indices = ivy.concat(
              (ivy.zeros_like(indices[..., -1:]), indices[..., :-1]),
              axis=-1,
          )
          x, indices = ivy.swapaxes(x, axis, -1), ivy.swapaxes(
              indices, axis, -1
          )
          return ivy.flip(x, axis=(axis,)), ivy.flip(
              indices, axis=(axis,)
          )
  
      elif exclusive:
          x = ivy.swapaxes(x, axis, -1)
          x = ivy.concat(
              (ivy.zeros_like(x[..., -1:]), x[..., :-1]), axis=-1
          )
          x = ivy.swapaxes(x, axis, -1)
          x, indices = __find_cummax(x, axis=axis)
  
          return x, indices
  
      else:
          x, indices = __find_cummax(
              ivy.flip(x, axis=(axis,)), axis=axis
          )
          return ivy.flip(x, axis=axis), ivy.flip(indices, axis=axis)
  
imports: from typing import Optional, Union, Tuple, Sequence, Any
  import paddle
  import ivy.functional.backends.paddle
  import ivy
  from copy import deepcopy
  from ivy.func_wrapper import with_unsupported_device_and_dtypes, with_supported_dtypes
  from .None import backend_version
label_desc: Use image node_id 19 for calling a global function with example usage: cummax() and returns: __find_cummax, ivy,  ivy, x,  indices, ivy,  ivy