code: def test_nan_cum_reduction(setup):
      raw = np.random.randint(5, size=(8, 8, 8)).astype(float)
      raw[:2, 2:4, 4:6] = np.nan
  
      arr = tensor(raw, chunk_size=6)
  
      res1 = nancumsum(arr, axis=1).execute().fetch()
      res2 = nancumprod(arr, axis=1).execute().fetch()
      expected1 = np.nancumsum(raw, axis=1)
      expected2 = np.nancumprod(raw, axis=1)
      np.testing.assert_array_equal(res1, expected1)
      np.testing.assert_array_equal(res2, expected2)
  
      raw = sps.random(8, 8, density=0.1, format="lil")
      raw[:2, 2:4] = np.nan
  
      arr = tensor(raw, chunk_size=6)
  
      res1 = nancumsum(arr, axis=1).execute().fetch()
      res2 = nancumprod(arr, axis=1).execute().fetch()
      expected1 = np.nancumsum(raw.A, axis=1)
      expected2 = np.nancumprod(raw.A, axis=1)
      assert np.allclose(res1, expected1) is True
      assert np.allclose(res2, expected2) is True
  
imports: import numpy
  import scipy.sparse
  import pytest
  from ....utils import ignore_warning
  from ...datasource import ones, tensor
  from ..None import mean, nansum, nanmax, nanmin, nanmean, nanprod, nanargmax, nanargmin, nanvar, nanstd, count_nonzero, allclose, array_equal, var, std, nancumsum, nancumprod
label_desc: Use image node_id 10 for calling a global function with example usage: test_nan_cum_reduction(setup) without return types