code: def test_max_min_execution(setup):
      raw = np.random.randint(10000, size=(10, 10, 10))
  
      arr = tensor(raw, chunk_size=3)
  
      assert raw.max() == arr.max().execute().fetch()
      assert raw.min() == arr.min().execute().fetch()
  
      np.testing.assert_array_equal(
          raw.max(axis=0), arr.max(axis=0).execute().fetch()
      )
      assert arr.max(axis=0).issparse() is False
      np.testing.assert_array_equal(
          raw.min(axis=0), arr.min(axis=0).execute().fetch()
      )
      assert arr.min(axis=0).issparse() is False
  
      np.testing.assert_array_equal(
          raw.max(axis=(1, 2)), arr.max(axis=(1, 2)).execute().fetch()
      )
      np.testing.assert_array_equal(
          raw.min(axis=(1, 2)), arr.min(axis=(1, 2)).execute().fetch()
      )
  
      raw = sps.random(10, 10, density=0.5)
  
      arr = tensor(raw, chunk_size=3)
  
      assert raw.max() == arr.max().execute().fetch()
      assert raw.min() == arr.min().execute().fetch()
  
      np.testing.assert_almost_equal(
          raw.max(axis=1).A.ravel(),
          arr.max(axis=1).execute().fetch().toarray(),
      )
      assert arr.max(axis=1).issparse() is True
      np.testing.assert_almost_equal(
          raw.min(axis=1).A.ravel(),
          arr.min(axis=1).execute().fetch().toarray(),
      )
      assert arr.min(axis=1).issparse() is True
  
      # test string dtype
      a = tensor(list("abcdefghi"), dtype=object)
      assert a.max().execute().fetch() == "i"
      a = tensor(list("abcdefghi"), dtype=object, chunk_size=2)
      assert a.max().execute().fetch() == "i"
  
      # test empty chunks
      raw = np.arange(3, 10)
      arr = tensor(np.arange(0, 10), chunk_size=3)
      arr = arr[arr >= 3]
      assert raw.max() == arr.max().execute().fetch()
      assert raw.min() == arr.min().execute().fetch()
  
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 2 for calling a global function with example usage: test_max_min_execution(setup) without return types