code: def test_fancy_indexing_numpy_execution(setup):
      # test fancy index of type numpy ndarray
      raw = np.random.random((11, 8, 12, 14))
      arr = tensor(raw, chunk_size=(6, 5, 7, 8))
  
      index = [9, 10, 3, 1, 8, 10]
      arr2 = arr[index]
  
      res = arr2.execute().fetch()
      np.testing.assert_array_equal(res, raw[index])
  
      index = np.random.permutation(8)
      arr3 = arr[:2, ..., index]
  
      res = arr3.execute().fetch()
      np.testing.assert_array_equal(res, raw[:2, ..., index])
  
      index = [1, 3, 9, 10]
      arr4 = arr[..., index, :5]
  
      res = arr4.execute().fetch()
      np.testing.assert_array_equal(res, raw[..., index, :5])
  
      index1 = [8, 10, 3, 1, 9, 10]
      index2 = [1, 3, 9, 10, 2, 7]
      arr5 = arr[index1, :, index2]
  
      res = arr5.execute().fetch()
      np.testing.assert_array_equal(res, raw[index1, :, index2])
  
      index1 = [1, 3, 5, 7, 9, 10]
      index2 = [1, 9, 9, 10, 2, 7]
      arr6 = arr[index1, :, index2]
  
      res = arr6.execute().fetch()
      np.testing.assert_array_equal(res, raw[index1, :, index2])
  
      index1 = [[8, 10, 3], [1, 9, 10]]
      index2 = [[1, 3, 9], [10, 2, 7]]
      arr7 = arr[index1, :, index2]
  
      res = arr7.execute().fetch()
      np.testing.assert_array_equal(res, raw[index1, :, index2])
  
      index1 = [[1, 3], [3, 7], [7, 7]]
      index2 = [1, 9]
      arr8 = arr[0, index1, :, index2]
  
      res = arr8.execute().fetch()
      np.testing.assert_array_equal(res, raw[0, index1, :, index2])
  
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 2 for calling a global function with example usage: test_fancy_indexing_numpy_execution(setup) without return types