code: def test_linspace(self, xp, scp, dtype, function):
      import scipy.special  # NOQA
  
      func = getattr(scp.special, function)
      # TODO: Some choices of start/stop value can give mismatched location
      #       of +inf or -inf values.
      tmp = xp.linspace(-20, 21, 10, dtype=dtype)
      a = tmp[:, xp.newaxis, xp.newaxis]
      b = tmp[xp.newaxis, :, xp.newaxis]
      x = xp.linspace(0, 1, 5, dtype=dtype)[xp.newaxis, xp.newaxis, :]
      return func(a, b, x)
  
file_path: cupy/tests/cupyx_tests/scipy_tests/special_tests/test_beta.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 TestBetaInc obj's underlying member method code with example usage: obj.test_linspace(xp, scp, dtype, function) and returns: func