code: def test_reduction_execution(setup):
      rs = np.random.RandomState(0)
      raw1 = rs.randint(5, size=(8, 8, 8))
      raw2 = rs.randint(5, size=(8, 8, 8))
      arr1 = tensor(raw1, chunk_size=4)
      arr2 = tensor(raw2, chunk_size=4)
  
      res1 = (arr1 + 1).sum(keepdims=True).execute().fetch()
      res2 = (arr1 + 1).prod(keepdims=True).execute().fetch()
      np.testing.assert_array_equal((raw1 + 1).sum(keepdims=True), res1)
      np.testing.assert_array_equal(
          (raw1 + 1).prod(keepdims=True), res2
      )
  
      res1 = (arr1 + 1).sum(axis=1).execute().fetch()
      res2 = (arr1 + 1).prod(axis=1).execute().fetch()
      res3 = (arr1 + 1).max(axis=1).execute().fetch()
      res4 = (arr1 + 1).min(axis=1).execute().fetch()
      np.testing.assert_array_equal((raw1 + 1).sum(axis=1), res1)
      np.testing.assert_array_equal((raw1 + 1).prod(axis=1), res2)
      np.testing.assert_array_equal((raw1 + 1).max(axis=1), res3)
      np.testing.assert_array_equal((raw1 + 1).min(axis=1), res4)
  
      raw3 = raw2 - raw1 + 10
      arr3 = -arr1 + arr2 + 10
  
      res1 = arr3.sum(axis=(0, 1)).execute().fetch()
      res2 = arr3.prod(axis=(0, 1)).execute().fetch()
      res3 = arr3.max(axis=(0, 1)).execute().fetch()
      res4 = arr3.min(axis=(0, 1)).execute().fetch()
      np.testing.assert_array_equal(raw3.sum(axis=(0, 1)), res1)
      np.testing.assert_array_equal(raw3.prod(axis=(0, 1)), res2)
      np.testing.assert_array_equal(raw3.max(axis=(0, 1)), res3)
      np.testing.assert_array_equal(raw3.min(axis=(0, 1)), res4)
  
file_path: mars/mars/tensor/fuse/tests/test_numexpr_execution.py
imports: import numpy
  from ....utils import ignore_warning
  from ...arithmetic import abs
  from ...datasource import tensor, arange
  from ...reduction import sum
label_desc: Use image node_id 5 for calling a global function with example usage: test_reduction_execution(setup) without return types