code: def testHarmonic(self):
      size = 32
      fund_freq = 440
      # harmonics:
      harms = [fund_freq * i for i in range(1, size + 1)]
  
      # enharmonics:
      enharms = [
          fund_freq * (pi / 3.0 * (1 + float(random.rand(1)) / 2.0))
          for i in range(size)
      ]
      enharms[0] = fund_freq
      enharms = array(sort(enharms))
  
      mags = zeros(size)
      mags[0] = 1
      mags[1] = 0.833333
      mags[2] = 0.75
      mags[3] = 0.555555
      mags[7] = 0.211
      mags[15] = 0.05
  
      self.assertTrue(
          Dissonance()(harms, mags) < Dissonance()(enharms, mags)
      )
  
file_path: essentia/test/src/unittests/tonal/test_dissonance.py
imports: from essentia_test import *
  from numpy import random, pi, sort
label_desc: Use image node_id 9 for calling the TestDissonance obj's underlying member method code with example usage: obj.testHarmonic() without return types