code: def accumulate(self, array, axis=0, dtype=None, out=None):
      if self._accumulator is None:
          raise NotImplementedError
      data = array if self._pre_agg is None else self._pre_agg(array)
      result = self._accumulator(data, axis=axis, dtype=dtype)
      result = (
          result if self._post_agg is None else self._post_agg(result)
      )
      if out is not None:
          out[0]._data = result._data
      else:
          return result
  
file_path: mars/mars/tensor/ufunc/ufunc.py
imports: from numbers import Number
  import numpy
  from ..datasource import tensor
  from ..None import arithmetic, reduction
label_desc: Use image node_id 4 for calling the TensorUfuncDef obj's underlying member method code with example usage: obj.accumulate(array, axis, dtype, out) and returns: result