code: def test_modes(self, xp, scp, size, h_len, mode, dtype):
      random_state = np.random.RandomState(5)
      x = random_state.randn(size).astype(dtype)
      if dtype in (np.complex64, np.complex128):
          x += 1j * random_state.randn(size)
      x = xp.asarray(x)
  
      h = xp.arange(1, 1 + h_len, dtype=x.real.dtype)
  
      y = scp.signal.upfirdn(h, x, up=1, down=1, mode=mode)
      return y
  
file_path: cupy/tests/cupyx_tests/scipy_tests/signal_tests/test_upfirdn.py
imports: from itertools import product
  import pytest
  import numpy
  from cupy import testing
  from cupyx.scipy.signal._upfirdn import _output_len
label_desc: Use image node_id 5 for calling the TestUpfirdn obj's underlying member method code with example usage: obj.test_modes(xp, scp, size, h_len, mode, dtype) and returns: y