code: def test_nans_infs(self, xp, scp):
      x = xp.array([cupy.inf, cupy.nan, -cupy.nan, -cupy.inf])
      return scp.special.softmax(x)
  
file_path: cupy/tests/cupyx_tests/scipy_tests/special_tests/test_softmax.py
imports: import pytest
  import cupy
  from cupy import testing
  import cupyx
  import cupyx.scipy.special
label_desc: Use image node_id 9 for calling the TestSoftmax obj's underlying member method code with example usage: obj.test_nans_infs(xp, scp) and returns: scp