code: def test_shapes(self):
      signal = np.zeros((512,)).astype(np.float32)
  
      # If fft_length is not provided, the smallest enclosing power of 2 of
      # frame_length (8) is used.
      stft = spectral_ops.stft(
          signal, frame_length=7, frame_step=8, pad_end=True
      )
      self.assertAllEqual([64, 5], stft.shape.as_list())
      self.assertAllEqual([64, 5], self.evaluate(stft).shape)
  
      stft = spectral_ops.stft(
          signal, frame_length=8, frame_step=8, pad_end=True
      )
      self.assertAllEqual([64, 5], stft.shape.as_list())
      self.assertAllEqual([64, 5], self.evaluate(stft).shape)
  
      stft = spectral_ops.stft(
          signal,
          frame_length=8,
          frame_step=8,
          fft_length=16,
          pad_end=True,
      )
      self.assertAllEqual([64, 9], stft.shape.as_list())
      self.assertAllEqual([64, 9], self.evaluate(stft).shape)
  
      stft = spectral_ops.stft(
          signal,
          frame_length=16,
          frame_step=8,
          fft_length=8,
          pad_end=True,
      )
      self.assertAllEqual([64, 5], stft.shape.as_list())
      self.assertAllEqual([64, 5], self.evaluate(stft).shape)
  
      stft = np.zeros((32, 9)).astype(np.complex64)
  
      inverse_stft = spectral_ops.inverse_stft(
          stft, frame_length=8, fft_length=16, frame_step=8
      )
      expected_length = (stft.shape[0] - 1) * 8 + 8
      self.assertAllEqual([256], inverse_stft.shape.as_list())
      self.assertAllEqual(
          [expected_length], self.evaluate(inverse_stft).shape
      )
  
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 7 for calling the SpectralOpsTest obj's underlying member method code with example usage: obj.test_shapes() without return types