code: def cummax(
      x: np.ndarray,
      /,
      *,
      axis: int = 0,
      exclusive: bool = False,
      reverse: bool = False,
      dtype: Optional[np.dtype] = None,
      out: Optional[np.ndarray] = None,
  ) -> Tuple[np.ndarray, np.ndarray]:
      if exclusive or reverse:
          if exclusive and reverse:
              indices = __find_cummax_indices(
                  np.flip(x, axis=axis), axis=axis
              )
              x = np.maximum.accumulate(
                  np.flip(x, axis=axis), axis=axis, dtype=x.dtype
              )
              x = np.swapaxes(x, axis, -1)
              indices = np.swapaxes(indices, axis, -1)
              x, indices = np.concatenate(
                  (np.zeros_like(x[..., -1:]), x[..., :-1]), -1
              ), np.concatenate(
                  (np.zeros_like(indices[..., -1:]), indices[..., :-1]),
                  -1,
              )
              x, indices = np.swapaxes(x, axis, -1), np.swapaxes(
                  indices, axis, -1
              )
              res, indices = np.flip(x, axis=axis), np.flip(
                  indices, axis=axis
              )
  
          elif exclusive:
              x = np.swapaxes(x, axis, -1)
              x = np.concatenate(
                  (np.zeros_like(x[..., -1:]), x[..., :-1]), -1
              )
              x = np.swapaxes(x, axis, -1)
              indices = __find_cummax_indices(x, axis=axis)
              res = np.maximum.accumulate(x, axis=axis, dtype=x.dtype)
          elif reverse:
              x = np.flip(x, axis=axis)
              indices = __find_cummax_indices(x, axis=axis)
              x = np.maximum.accumulate(x, axis=axis)
              res, indices = np.flip(x, axis=axis), np.flip(
                  indices, axis=axis
              )
          return res, indices
      indices = __find_cummax_indices(x, axis=axis)
      return np.maximum.accumulate(x, axis=axis, dtype=x.dtype), indices
  
imports: from typing import Optional, Union, Tuple, Sequence
  import numpy
  import math
  import ivy
  from ivy.func_wrapper import with_unsupported_dtypes
  from .None import backend_version
  from ..statistical import _infer_dtype
  from copy import deepcopy
label_desc: Use image node_id 16 for calling a global function with example usage: cummax() and returns: np,  indices, res,  indices