code: def test_harmonic_to_sinusoidal_removes_nyquist_harmonics(self):
      f0_hz = np.asarray([50, 3001, 4001, 3001, 50])[
          np.newaxis, :, np.newaxis
      ]
      orig_harm_amps = np.ones(shape=(1, 5, 3))
      harm_amps = orig_harm_amps / np.sum(
          orig_harm_amps, axis=-1, keepdims=True
      )
      amps, sin_freqs = core.harmonic_to_sinusoidal(
          10, harm_amps, f0_hz
      )
      sin_freqs = np.squeeze(sin_freqs)
      f0_hz = np.squeeze(f0_hz)
      expected_amps = orig_harm_amps * 10
      # f1 > nyquist
      expected_amps[:, 2, 1] = 0
      # f2 > nyquist
      expected_amps[:, 1:4, 2] = 0
      # normalize
      expected_amps[:, 0] /= 3
      expected_amps[:, 1] /= 2
      expected_amps[:, 3] /= 2
      expected_amps[:, 4] /= 3
      self.assertAllClose(amps[..., 0], expected_amps[..., 0])
      self.assertAllClose(amps[..., 1], expected_amps[..., 1])
      self.assertAllClose(amps[..., 2], expected_amps[..., 2])
      self.assertAllClose(sin_freqs[..., 0], f0_hz)
      self.assertAllClose(sin_freqs[..., 1], f0_hz * 2)
      self.assertAllClose(sin_freqs[..., 2], f0_hz * 3)
  
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 9 for calling the UtilitiesTest obj's underlying member method code with example usage: obj.test_harmonic_to_sinusoidal_removes_nyquist_harmonics() without return types