code: def test_firfilter2(dtype, num_samps, filter_len, padtype):
      cpu_sig, gpu_sig = linspace_data_gen(
          0, 10, num_samps, endpoint=False
      )
      cpu_filter, _ = scipy.signal.butter(filter_len, 0.5)
      gpu_filter = cupy.asarray(cpu_filter)
      cpu_output = scipy.signal.filtfilt(
          cpu_filter, 1, cpu_sig, padtype=padtype
      )
      gpu_output = cupyx.signal.firfilter2(
          gpu_filter, gpu_sig, padtype=padtype
      )
      testing.assert_allclose(
          gpu_output, cpu_output, atol=1e-3, rtol=1e-3
      )
  
file_path: cupy/tests/cupyx_tests/signal_tests/filtering_tests/test_filtering.py
imports: import pytest
  import numpy
  import scipy
  import cupy
  import cupyx.signal
  import cupyx.scipy.signal
  from cupy import testing
label_desc: Use image node_id 4 for calling a global function with example usage: test_firfilter2(dtype, num_samps, filter_len, padtype) without return types