code: def test_unary_operand_out(func, tensor_cls):
      sp_func = getattr(spsecial, func)
      mt_func = getattr(mt_special, func)
  
      raw = np.random.rand(10, 8, 5)
      t = tensor(raw, chunk_size=3)
  
      out = tensor(raw, chunk_size=3)
      r_with_optional = mt_func(t, out)
      expect = sp_func(raw)
  
      assert out.shape == raw.shape
      assert out.dtype == expect.dtype
  
      assert r_with_optional.shape == raw.shape
      assert r_with_optional.dtype == expect.dtype
  
      t_optional_out, out = tile(t, out)
  
      assert out.nsplits == t_optional_out.nsplits
      for c in out.chunks:
          assert isinstance(c.op, tensor_cls)
          assert c.index == c.inputs[0].index
          assert c.shape == c.inputs[0].shape
  
      t_optional_r, r_with_optional = tile(t, r_with_optional)
  
      assert r_with_optional.nsplits == t_optional_r.nsplits
      for c in r_with_optional.chunks:
          assert isinstance(c.op, tensor_cls)
          assert c.index == c.inputs[0].index
          assert c.shape == c.inputs[0].shape
  
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 2 for calling a global function with example usage: test_unary_operand_out(func, tensor_cls) without return types