code: def test_cum_reduction():
      cumsum = lambda x, *args, **kwargs: tile(
          x.cumsum(*args, **kwargs)
      )
      cumprod = lambda x, *args, **kwargs: tile(
          x.cumprod(*args, **kwargs)
      )
  
      res1 = cumsum(ones((10, 8), chunk_size=3), axis=0)
      res2 = cumprod(ones((10, 8), chunk_size=3), axis=0)
      assert res1.shape == (10, 8)
      assert res1.dtype is not None
      assert res2.shape == (10, 8)
      assert res2.dtype is not None
  
      res1 = cumsum(ones((10, 8, 8), chunk_size=3), axis=1)
      res2 = cumprod(ones((10, 8, 8), chunk_size=3), axis=1)
      assert res1.shape == (10, 8, 8)
      assert res2.shape == (10, 8, 8)
  
      res1 = cumsum(ones((10, 8, 8), chunk_size=3), axis=-2)
      res2 = cumprod(ones((10, 8, 8), chunk_size=3), axis=-2)
      assert res1.shape == (10, 8, 8)
      assert res2.shape == (10, 8, 8)
  
      with pytest.raises(np.AxisError):
          cumsum(ones((10, 8), chunk_size=3), axis=2)
      with pytest.raises(np.AxisError):
          cumsum(ones((10, 8), chunk_size=3), axis=-3)
  
file_path: mars/mars/tensor/reduction/tests/test_reduction.py
imports: import numpy
  import pytest
  from ....core import tile
  from ....core.operand import OperandStage
  from ...datasource import ones, tensor
  from ...merge import TensorConcatenate
  from ..None import all, TensorMean, TensorArgmax, TensorArgmin
label_desc: Use image node_id 4 for calling a global function with example usage: test_cum_reduction() without return types