code: def test_recreate_midi(self):
      notes = np.loadtxt(pj(ANNOTATIONS_PATH, "stereo_sample.notes"))
      # create a MIDI file from the notes
      midi = MIDIFile.from_notes(notes)
      notes_ = midi.notes()[:, :4]
      self.assertTrue(np.allclose(notes, notes_, atol=1e-3))
      # write to a temporary file
      midi.write(tmp_file)
      # FIXME: re-read this file and compare the notes
      tmp_midi = MIDIFile.from_file(tmp_file)
      notes_ = tmp_midi.notes()[:, :4]
      self.assertTrue(np.allclose(notes, notes_, 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.utils.midi import *
  from .None import ANNOTATIONS_PATH
label_desc: Use image node_id 2 for calling the TestMIDIFileClass obj's underlying member method code with example usage: obj.test_recreate_midi() without return types