code: def test_write_midi(self):
      notes = np.loadtxt(pj(ANNOTATIONS_PATH, "stereo_sample.notes"))
      # write to a temporary file
      write_midi(notes, tmp_file)
      # read in that file and compare notes
      tmp_midi = MIDIFile(tmp_file)
      self.assertTrue(
          np.allclose(notes, tmp_midi.notes[:, :4], atol=1e-3)
      )
  
imports: from __future__ import absolute_import, division, print_function
  import os
  import tempfile
  import unittest
  from os.path import join
  from madmom.io.midi import *
  from .None import ANNOTATIONS_PATH
label_desc: Use image node_id 1 for calling the TestWriteMidiFunction obj's underlying member method code with example usage: obj.test_write_midi() without return types