code: def make_case_2D(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)
  
      if case == "2D":
          # 2D, random
          size = (3, 5)
          x = rng.randn(*size).astype(x_dtype)
          if x_dtype in (np.complex64, np.complex128):
              x += 1j * rng.randn(*size)
          return x, h
      elif case == "2D_noncontig":
          # 2D, random, non-contiguous
          size = (3, 7)
          x = rng.randn(*size).astype(x_dtype)
          if x_dtype in (np.complex64, np.complex128):
              x += 1j * rng.randn(*size)
          x = x[::2, 1::3].T
          return x, h
      else:
          raise ValueError(f"unknown 2D_case, {case}.")
  
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 3 for calling a global function with example usage: make_case_2D(up, down, h, x_dtype, case) and returns: x,  h, x,  h