code: def test_slice_execution(setup):
      raw = np.random.random((11, 8, 12, 14))
      arr = tensor(raw, chunk_size=6)
  
      arr2 = arr[2:9:2, 3:7, -1:-9:-2, 12:-11:-4]
      res = arr2.execute().fetch()
  
      np.testing.assert_array_equal(
          res, raw[2:9:2, 3:7, -1:-9:-2, 12:-11:-4]
      )
  
      arr3 = arr[-4, 2:]
      res = arr3.execute().fetch()
      np.testing.assert_equal(res, raw[-4, 2:])
  
      raw = sps.random(12, 14, density=0.1)
      arr = tensor(raw, chunk_size=6)
  
      arr2 = arr[-1:-9:-2, 12:-11:-4]
      res = arr2.execute().fetch()
  
      np.testing.assert_equal(
          res.toarray(), raw.toarray()[-1:-9:-2, 12:-11:-4]
      )
  
      # test order
      raw = np.asfortranarray(np.random.random((11, 8, 12, 14)))
      arr = tensor(raw, chunk_size=6)
  
      arr2 = arr[2:9:2, 3:7, -1:-9:-2, 12:-11:-4]
      res = arr2.execute().fetch()
      expected = raw[2:9:2, 3:7, -1:-9:-2, 12:-11:-4].copy("A")
  
      np.testing.assert_array_equal(res, expected)
      assert res.flags["C_CONTIGUOUS"] == expected.flags["C_CONTIGUOUS"]
      assert res.flags["F_CONTIGUOUS"] == expected.flags["F_CONTIGUOUS"]
  
      arr3 = arr[0:13, :, None]
      res = arr3.execute().fetch()
      expected = raw[0:13, :, None].copy("A")
  
      np.testing.assert_array_equal(res, expected)
      assert res.flags["C_CONTIGUOUS"] == expected.flags["C_CONTIGUOUS"]
      assert res.flags["F_CONTIGUOUS"] == expected.flags["F_CONTIGUOUS"]
  
imports: import numpy
  import scipy.sparse
  import pytest
  from ....config import options
  from ...None import mod, stack, hstack
  from ...datasource import tensor, arange, zeros
  from ..None import take, compress, extract, choose, unravel_index, nonzero, flatnonzero, fill_diagonal
label_desc: Use image node_id 4 for calling a global function with example usage: test_slice_execution(setup) without return types