docstr: Tests generating impulse responses from a list of magnitudes.
  
  The output size should be determined by the window size, or fft_size if
  window size < 1.
  
  Args:
    fft_size: Size of the fft that generated the magnitudes.
    window_size: Size of window to apply to inverse fft.
docstr_tok: ["Tests","generating","impulse","responses","from","a","list","of","magnitudes",".","The","output","size","should","be","determined","by","the","window","size",",","or","fft_size","if","window","size","<","1",".","Args",":","fft_size",":","Size","of","the","fft","that","generated","the","magnitudes",".","window_size",":","Size","of","window","to","apply","to","inverse","fft","."]
code: def test_frequency_impulse_response_gives_correct_size(
      self, fft_size, window_size
  ):
      """Tests generating impulse responses from a list of magnitudes.
  
      The output size should be determined by the window size, or fft_size if
      window size < 1.
  
      Args:
        fft_size: Size of the fft that generated the magnitudes.
        window_size: Size of window to apply to inverse fft.
      """
      # Create random signals to convolve.
      n_frequencies = fft_size // 2 + 1
      magnitudes = np.random.uniform(size=(1, n_frequencies)).astype(
          np.float32
      )
  
      impulse_response = core.frequency_impulse_response(
          magnitudes, window_size
      )
  
      target_size = fft_size
      if target_size > window_size >= 1:
          target_size = window_size
          is_even = target_size % 2 == 0
          target_size -= int(is_even)
  
      impulse_response_size = int(impulse_response.shape[-1])
      self.assertEqual(impulse_response_size, target_size)
  
imports: from absl.testing import parameterized
  from ddsp import core
  import librosa
  import numpy
  from scipy import signal
  import tensorflow.compat.v2
label_desc: Use image node_id 8 for calling the FiniteImpulseResponseTest obj's underlying member method code with example usage: obj.test_frequency_impulse_response_gives_correct_size(fft_size, window_size) without return types