code: def create_test(algo, mode):
      def do_test_pitch(self):
          self.run_pitch_on_sinusoid(
              algo, mode[0], mode[1], mode[2], mode[3]
          )
  
      return do_test_pitch
  
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 a global function with example usage: create_test(algo, mode) and returns: do_test_pitch