code: def test_unary_execution(setup, func):
      sp_func = getattr(spspecial, func)
      mt_func = getattr(mt_special, func)
  
      raw = np.random.rand(10, 8, 6)
      a = tensor(raw, chunk_size=3)
  
      r = mt_func(a)
  
      result = r.execute().fetch()
      expected = sp_func(raw)
  
      np.testing.assert_array_equal(result, expected)
  
      # test sparse
      raw = sps.csr_matrix(np.array([0, 1.0, 1.01, np.nan]))
      a = tensor(raw, chunk_size=3)
  
      r = mt_func(a)
  
      result = r.execute().fetch()
  
      data = sp_func(raw.data)
      expected = sps.csr_matrix(
          (data, raw.indices, raw.indptr), raw.shape
      )
  
      np.testing.assert_array_equal(
          result.toarray(), expected.toarray()
      )
  
file_path: mars/mars/tensor/special/tests/test_special_execution.py
imports: import numpy
  import pytest
  import scipy
  import scipy.sparse
  import scipy.special
  from ....lib.version import parse
  from ...None import tensor
  from ...None import special
label_desc: Use image node_id 1 for calling a global function with example usage: test_unary_execution(setup, func) without return types