code: def sinewave(freq, duration, samplerate=samplerate):
      """generate a sinewave"""
      length = hop_size
      while length < duration * samplerate:
          length += hop_size
      return np.sin(
          2.0 * np.pi * np.arange(length) * freq / samplerate
      ).astype("float32")
  
imports: import numpy
  from aubio import pitch
  import pylab
label_desc: Use image node_id 1 for calling a global function with example usage: sinewave(freq, duration, samplerate) and returns: np