code: def testTwoPeaksHarmonics(self):
      # Provide a 2 input peaks with a unit magnitude and validate
      # that PSF is different depending on numberHarmonics configuration.
      freq_speaks = [55, 110]
      mag_speaks = [1, 1]
      outputLength = 600
  
      calculatedPitchSalience1H = PitchSalienceFunction(
          numberHarmonics=1
      )(freq_speaks, mag_speaks)
      self.assertEqual(len(calculatedPitchSalience1H), outputLength)
      calculatedPitchSalience20H = PitchSalienceFunction(
          numberHarmonics=20
      )(freq_speaks, mag_speaks)
      self.assertEqual(len(calculatedPitchSalience20H), outputLength)
  
      # Save operation is commented out. Uncomment to tweak parameters orinput to genrate new referencesw when required.
      # save('calculatedPitchSalience_test2PeaksHarmonics1H.npy', calculatedPitchSalience1H)
      # save('calculatedPitchSalience_test2PeaksHarmonics20H.npy', calculatedPitchSalience20H)
      # Reference samples are loaded as expected values
  
      expectedPitchSalience1H = load(
          join(
              filedir(),
              "pitchsalience/calculatedPitchSalience_test2PeaksHarmonics1H.npy",
          )
      )
      expectedPitchSalienceList1H = expectedPitchSalience1H.tolist()
      expectedPitchSalience20H = load(
          join(
              filedir(),
              "pitchsalience/calculatedPitchSalience_test2PeaksHarmonics20H.npy",
          )
      )
      expectedPitchSalienceList20H = expectedPitchSalience20H.tolist()
      # Detailed contents check on returned values (regression check
      self.assertAlmostEqualVectorFixedPrecision(
          calculatedPitchSalience1H, expectedPitchSalienceList1H, 7
      )
      self.assertAlmostEqualVectorFixedPrecision(
          calculatedPitchSalience20H, expectedPitchSalienceList20H, 7
      )
  
imports: from essentia_test import *
  from numpy import *
label_desc: Use image node_id 7 for calling the TestPitchSalienceFunction obj's underlying member method code with example usage: obj.testTwoPeaksHarmonics() without return types