docstr: Ensure that compute_f0 (crepe) has expected output shape.
docstr_tok: ["Ensure","that","compute_f0","(","crepe",")","has","expected","output","shape","."]
code: def test_compute_f0(self, padding, audio_len_sec):
      """Ensure that compute_f0 (crepe) has expected output shape."""
      sr = 16000
      audio_sin = gen_np_sinusoid(
          self.frequency, self.amp, sr, audio_len_sec
      )
      expected_len = self.expected_f0_length(audio_sin, padding)
      f0_hz, f0_confidence = spectral_ops.compute_f0(
          audio_sin, self.frame_rate, viterbi=True, padding=padding
      )
      self.assertLen(f0_hz, expected_len)
      self.assertLen(f0_confidence, expected_len)
      self.assertTrue(np.all(np.isfinite(f0_hz)))
      self.assertTrue(np.all(np.isfinite(f0_confidence)))
  
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 4 for calling the ComputeFeaturesTest obj's underlying member method code with example usage: obj.test_compute_f0(padding, audio_len_sec) without return types