code: def cummax(input, dim, *, out=None):
      input_dtype = input.dtype
      result_values, result_indices = ivy.cummax(
          input, axis=dim, out=out
      )
      result_values = result_values.astype(input_dtype)
      return result_values, result_indices
  
imports: import ivy
  from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
  from ivy.functional.frontends.torch.func_wrapper import to_ivy_arrays_and_back
  from ivy.functional.frontends.torch import promote_types_of_torch_inputs
  import ivy.functional.frontends.torch
label_desc: Use image node_id 13 for calling a global function with example usage: cummax(input, dim) and returns: result_values,  result_indices