code: def run_pitch_on_sinusoid(
      self, method, buf_size, hop_size, samplerate, freq
  ):
      # create pitch object
      p = pitch(method, buf_size, hop_size, samplerate)
      # duration in seconds
      seconds = 0.3
      # duration in samples
      duration = seconds * samplerate
      # increase to the next multiple of hop_size
      duration = duration - duration % hop_size + hop_size
      # build sinusoid
      sinvec = self.build_sinusoid(duration, freq, samplerate)
  
      self.run_pitch(p, sinvec, freq)
  
file_path: aubio/python/tests/test_pitch.py
imports: from numpy.testing import TestCase, assert_equal
  from numpy import sin, arange, mean, median, isnan, pi
  from aubio import fvec, pitch, freqtomidi, float_type
label_desc: Use image node_id 1 for calling the aubio_pitch_Sinusoid obj's underlying member method code with example usage: obj.run_pitch_on_sinusoid(method, buf_size, hop_size, samplerate, freq) without return types