docstr: Test that inverse_stft_window_fn has unit gain at each window phase.
docstr_tok: ["Test","that","inverse_stft_window_fn","has","unit","gain","at","each","window","phase","."]
code: def test_inverse_stft_window_fn(self, frame_length, frame_step):
      """Test that inverse_stft_window_fn has unit gain at each window phase."""
      hann_window = window_ops.hann_window(
          frame_length, dtype=dtypes.float32
      )
      inverse_window_fn = spectral_ops.inverse_stft_window_fn(
          frame_step
      )
      inverse_window = inverse_window_fn(
          frame_length, dtype=dtypes.float32
      )
      hann_window, inverse_window = self.evaluate(
          [hann_window, inverse_window]
      )
  
      # Expect unit gain at each phase of the window.
      product_window = hann_window * inverse_window
      for i in range(frame_step):
          self.assertAllClose(
              1.0, np.sum(product_window[i::frame_step])
          )
  
imports: import itertools
  from absl.testing import parameterized
  import numpy
  from tensorflow.python.eager import context
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gradient_checker_v2
  from tensorflow.python.ops import gradients_impl
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops.signal import spectral_ops
  from tensorflow.python.ops.signal import window_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 10 for calling the SpectralOpsTest obj's underlying member method code with example usage: obj.test_inverse_stft_window_fn(frame_length, frame_step) without return types