code: def runTest(
      self, signal, sr, freq, pitch_precision=1, conf_precision=0.1
  ):
      frameSize = 1024
      hopsize = frameSize
  
      frames = FrameGenerator(
          signal, frameSize=frameSize, hopSize=hopsize
      )
      pitchDetect = PitchYin(frameSize=frameSize, sampleRate=sr)
      pitch = []
      confidence = []
      for frame in frames:
          f, conf = pitchDetect(frame)
          pitch += [f]
          confidence += [conf]
      self.assertAlmostEqual(mean(f), freq, pitch_precision)
      self.assertAlmostEqual(mean(confidence), 1, conf_precision)
  
file_path: essentia/test/src/unittests/tonal/test_pitchyin.py
imports: from essentia_test import *
  from numpy import sin, pi, mean, random
label_desc: Use image node_id 7 for calling the TestPitchYin obj's underlying member method code with example usage: obj.runTest(signal, sr, freq, pitch_precision, conf_precision) without return types