code: def check_response(self, h, expected_response, tol=0.05):
      N = len(h)
      alpha = 0.5 * (N - 1)
      m = np.arange(0, N) - alpha  # time indices of taps
      for freq, expected in expected_response:
          actual = abs(np.sum(h * np.exp(-1.0j * np.pi * m * freq)))
          mse = abs(actual - expected) ** 2
          assert_(
              mse < tol,
              "response not as expected, mse=%g > %g" % (mse, tol),
          )
  
imports: from __future__ import division, print_function, absolute_import
  import numpy
  from numpy.testing import assert_almost_equal, assert_array_almost_equal, assert_equal, assert_, assert_allclose, assert_warns
  from pytest import raises
  from scipy.special import sinc
  from scipy.signal import kaiser_beta, kaiser_atten, kaiserord, firwin, firwin2, freqz, remez, firls, minimum_phase
label_desc: Use image node_id 1 for calling the TestFirwin obj's underlying member method code with example usage: obj.check_response(h, expected_response, tol) without return types