code: def make_case(up, down, h, x_dtype, case):
      # replacement for the UpFIRDnCase class from the SciPy tests
      rng = np.random.RandomState(17)
      h = np.atleast_1d(h)
      x = {
          "tiny": np.ones(1, dtype=x_dtype),
          "ones": np.ones(10, dtype=x_dtype),
          "randn": rng.randn(10).astype(x_dtype),
          "ramp": np.arange(10).astype(x_dtype),
          # XXX: add 2D / 3D cases from UpFIRDnCase
      }[case]
  
      if "case" == "randn" and x_dtype in (np.complex64, np.complex128):
          x += 1j * rng.randn(10)
      return x, h
  
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 2 for calling a global function with example usage: make_case(up, down, h, x_dtype, case) and returns: x,  h