docstr: Ensure that pad() and get_framed_lengths() have correct shapes.
docstr_tok: ["Ensure","that","pad","(",")","and","get_framed_lengths","(",")","have","correct","shapes","."]
code: def test_padding_shapes_are_correct(self, padding, hop_size):
      """Ensure that pad() and get_framed_lengths() have correct shapes."""
      frame_size = 200
      n_t = 1000
      audio = tf.random.normal([1, n_t])
      padded_audio = spectral_ops.pad(
          audio, frame_size, hop_size, padding
      )
      n_t_pad = padded_audio.shape[1]
  
      frames = tf.signal.frame(padded_audio, frame_size, hop_size)
      n_frames = frames.shape[1]
  
      exp_n_frames, exp_n_t_pad = spectral_ops.get_framed_lengths(
          n_t, frame_size, hop_size, padding
      )
  
      self.assertEqual(n_frames, exp_n_frames)
      self.assertEqual(n_t_pad, exp_n_t_pad)
  
imports: from absl.testing import parameterized
  from ddsp import spectral_ops
  from ddsp.test_util import gen_np_sinusoid
  import numpy
  import tensorflow.compat.v2
label_desc: Use image node_id 2 for calling the PadTest obj's underlying member method code with example usage: obj.test_padding_shapes_are_correct(padding, hop_size) without return types