code: def test_vs_lfilter(self):
      # Check that up=1.0 gives same answer as lfilter + slicing
      random_state = np.random.RandomState(17)
      try_types = (int, np.float32, np.complex64, float, complex)
      size = 10000
      down_factors = [2, 11, 79]
  
      for dtype in try_types:
          x = random_state.randn(size).astype(dtype)
          if dtype in (np.complex64, np.complex128):
              x += 1j * random_state.randn(size)
  
          for down in down_factors:
              h = firwin(31, 1.0 / down, window="hamming")
              yl = lfilter(h, 1.0, x)[::down]
              y = upfirdn(h, x, up=1, down=down)
              assert_allclose(yl, y[: yl.size], atol=1e-7, rtol=1e-7)
  
file_path: catboost/contrib/python/scipy/py2/scipy/signal/tests/test_upfirdn.py
imports: import numpy
  from itertools import product
  from numpy.testing import assert_equal, assert_allclose
  from pytest import raises
  from scipy.signal import upfirdn, firwin, lfilter
  from scipy.signal._upfirdn import _output_len
label_desc: Use image node_id 2 for calling the TestUpfirdn obj's underlying member method code with example usage: obj.test_vs_lfilter() without return types