code: def test_write_and_read_events(self):
      write_events(EVENTS, pj(DATA_PATH, "events.txt"))
      annotations = load_events(pj(DATA_PATH, "events.txt"))
      self.assertTrue(np.allclose(annotations, EVENTS))
  
imports: from __future__ import absolute_import, division, print_function
  import unittest
  from os.path import join, join
  from madmom.io import *
  from madmom.io import load_beats, load_key, load_notes, load_onsets, load_tempo
  from tests import ANNOTATIONS_PATH, DETECTIONS_PATH
  from .None import DATA_PATH
label_desc: Use image node_id 3 for calling the TestWriteEventsFunction obj's underlying member method code with example usage: obj.test_write_and_read_events() without return types