docstr: Tests that sum_sinusoids reduces the last dimension.
docstr_tok: ["Tests","that","sum_sinusoids","reduces","the","last","dimension","."]
code: def test_oscillator_bank_shape_is_correct(self, sum_sinusoids):
      """Tests that sum_sinusoids reduces the last dimension."""
      frequencies = np.array([1.0, 1.5, 2.0]) * 400.0
      amplitudes = np.ones_like(frequencies)
  
      # Create tensors of frequencies and amplitudes for tf function.
      ones = np.ones([self.batch_size, self.n_samples, 3])
      frequency_envelopes = (
          ones * frequencies[np.newaxis, np.newaxis, :]
      )
      amplitude_envelopes = ones * amplitudes[np.newaxis, np.newaxis, :]
  
      wav_tf = core.oscillator_bank(
          frequency_envelopes,
          amplitude_envelopes,
          sample_rate=self.sample_rate,
          sum_sinusoids=sum_sinusoids,
      )
      if sum_sinusoids:
          expected_shape = [self.batch_size, self.n_samples]
      else:
          expected_shape = [self.batch_size, self.n_samples, 3]
      self.assertAllEqual(expected_shape, list(wav_tf.shape))
  
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 3 for calling the HarmonicSynthTest obj's underlying member method code with example usage: obj.test_oscillator_bank_shape_is_correct(sum_sinusoids) without return types