code: def cummin(
      x: Union[tf.Tensor, tf.Variable],
      /,
      *,
      axis: int = 0,
      exclusive: bool = False,
      reverse: bool = False,
      dtype: Optional[tf.DType] = None,
      out: Optional[Union[tf.Tensor, tf.Variable]] = None,
  ) -> Union[tf.Tensor, tf.Variable]:
      dtype = ivy.as_native_dtype(dtype)
      if reverse:
          x = tf.reverse(x, axis=[axis])
      x_unstacked = tf.unstack(x, axis=axis)
      cummin_x_unstacked = []
      cummin_x_unstacked.append(x_unstacked[0])
      for i, x_sub in enumerate(x_unstacked[1:]):
          cummin_x_sub = tf.minimum(cummin_x_unstacked[i], x_sub)
          cummin_x_unstacked.append(cummin_x_sub)
      cummin_x = tf.stack(cummin_x_unstacked, axis=axis)
      if reverse:
          cummin_x = tf.reverse(cummin_x, axis=[axis])
      if dtype is None:
          return cummin_x
      else:
          return tf.cast(cummin_x, dtype)
  
imports: from typing import Union, Optional, Tuple, Sequence
  import tensorflow
  from tensorflow.python.ops.numpy_ops import np_math_ops
  import ivy
  from ivy import with_unsupported_dtypes, with_supported_dtypes, with_supported_device_and_dtypes
  from ..None import backend_version
  from copy import deepcopy
label_desc: Use image node_id 20 for calling a global function with example usage: cummin() and returns: cummin_x, tf