code: def cumsum(x, axis=None):
      """Cumulative sum of array elements over a given axis.
  
      Args:
          x (:class:`~chainer.Variable` or :ref:`ndarray`):
              Elements to calculate the cumulative sum.
          axis (int or None):
              Axis along which the cumulative sum is taken.
              If it is not specified, the input is flattened.
  
      Returns:
          ~chainer.Variable: Output variable.
  
      """
      return Cumsum(axis).apply((x,))[0]
  
file_path: chainer/chainer/functions/math/cumsum.py
imports: import six
  from chainer import backend
  from chainer import function_node
  from chainer.functions.array import flip
  from chainer.utils import type_check
label_desc: Use image node_id 1 for calling a global function with example usage: cumsum(x, axis) and returns: Cumsum