code: def cumsum(
      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 dtype is None:
          if dtype is tf.bool:
              dtype = ivy.default_int_dtype()
          elif ivy.is_int_dtype(x.dtype):
              dtype = ivy.promote_types(
                  x.dtype, ivy.default_int_dtype(as_native=True)
              )
          else:
              dtype = _infer_dtype(x.dtype)
          dtype = ivy.as_native_dtype(dtype)
      x = tf.cast(x, dtype)
      return tf.math.cumsum(x, axis, exclusive, reverse)
  
file_path: ivy/ivy/functional/backends/tensorflow/statistical.py
imports: import tensorflow
  from typing import Union, Optional, Sequence
  import ivy
  from ivy.func_wrapper import with_unsupported_dtypes
  from .None import backend_version
  from ivy.utils.einsum_parser import legalise_einsum_expr
label_desc: Use image node_id 10 for calling a global function with example usage: cumsum(x, axis, exclusive, reverse) and returns: tf