code: def test_linspace(self, xp, scp, dtype, function):
      import scipy.special  # NOQA
  
      a = numpy.linspace(-30, 30, 1000, dtype=dtype)
      if a.dtype.kind == "c":
          a -= 1j * a
      a = xp.asarray(a)
      func = getattr(scp.special, function)
      return func(a)
  
file_path: cupy/tests/cupyx_tests/scipy_tests/special_tests/test_gamma.py
imports: import numpy
  import pytest
  import cupy
  from cupy import testing
  import cupyx.scipy.special
label_desc: Use image node_id 2 for calling the TestGamma obj's underlying member method code with example usage: obj.test_linspace(xp, scp, dtype, function) and returns: func