code: def cummin(
      x: torch.Tensor,
      /,
      *,
      axis: int = 0,
      exclusive: bool = False,
      reverse: bool = False,
      dtype: Optional[torch.dtype] = None,
      out: Optional[torch.Tensor] = None,
  ) -> torch.Tensor:
      dtype = ivy.as_native_dtype(dtype)
      if dtype is None:
          dtype = _infer_dtype(x.dtype)
      if not reverse:
          ret = torch.cummin(x, axis)[0]
      else:
          ret = torch.cummin(torch.flip(x, dims=(axis,)), axis)[0]
          ret = torch.flip(ret, (axis,))
      if ivy.exists(out):
          return ivy.inplace_update(out, ret.to(dtype))
      return ret.to(dtype)
  
imports: from typing import Optional, Union, Tuple, Sequence
  import torch
  from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
  from .None import backend_version
  import ivy
  from ..statistical import _infer_dtype
  from copy import deepcopy
label_desc: Use image node_id 19 for calling a global function with example usage: cummin() and returns: ret, ivy