code: def test_unary_tuple_operand(func, tensor_cls, n_outputs):
      sp_func = getattr(spsecial, func)
      mt_func = getattr(mt_special, func)
  
      raw = np.random.rand(10, 8, 5)
      t = tensor(raw, chunk_size=3)
  
      r = mt_func(t)
      expect = sp_func(raw)
  
      assert isinstance(r, ExecutableTuple)
  
      for r_i, expect_i in zip(r, expect):
          assert r_i.shape == expect_i.shape
          assert r_i.dtype == expect_i.dtype
          assert isinstance(r_i.op, tensor_cls)
  
      non_tuple_out = tensor(raw, chunk_size=3)
      with pytest.raises(TypeError):
          r = mt_func(t, non_tuple_out)
  
      mismatch_size_tuple = ExecutableTuple([t])
      with pytest.raises(TypeError):
          r = mt_func(t, mismatch_size_tuple)
  
      out = ExecutableTuple([t] * n_outputs)
      r_out = mt_func(t, out=out)
  
      assert isinstance(out, ExecutableTuple)
      assert isinstance(r_out, ExecutableTuple)
  
      for r_output, expected_output, out_output in zip(r, expect, out):
          assert r_output.shape == expected_output.shape
          assert r_output.dtype == expected_output.dtype
          assert isinstance(r_output.op, tensor_cls)
  
          assert out_output.shape == expected_output.shape
          assert out_output.dtype == expected_output.dtype
          assert isinstance(out_output.op, tensor_cls)
  
file_path: mars/mars/tensor/special/tests/test_special.py
imports: import numpy
  import scipy
  import pytest
  import scipy.special
  from ....lib.version import parse
  from ....core import tile, ExecutableTuple
  from ...None import tensor
  from ...None import special
  from ..err_fresnel import TensorErf, TensorErfc, TensorErfcx, TensorErfi, TensorErfinv, TensorErfcinv, TensorWofz, TensorDawsn, TensorFresnel, TensorModFresnelP, TensorModFresnelM, TensorVoigtProfile
  from ..gamma_funcs import TensorGammaln, TensorBetaInc
  from ..ellip_func_integrals import TensorElliprc, TensorElliprd, TensorElliprf, TensorElliprg, TensorElliprj, TensorEllipk, TensorEllipkm1, TensorEllipkinc, TensorEllipe, TensorEllipeinc
  from ..airy import TensorAiry, TensorAirye, TensorItairy
label_desc: Use image node_id 3 for calling a global function with example usage: test_unary_tuple_operand(func, tensor_cls, n_outputs) without return types