code: def test_length(self):
      # length = 280
      quantized = quantize_events(EVENTS, 100, length=280)
      idx = np.nonzero(quantized)[0]
      # targets: [1, 1.02, 1.5, 2.0, 2.03, 2.05, 2.5, 3]
      self.assertTrue(
          np.allclose(idx, [100, 102, 150, 200, 203, 205, 250])
      )
  
imports: from __future__ import absolute_import, division, print_function
  import unittest
  from os.path import join
  from madmom.utils import *
  from .None import ACTIVATIONS_PATH, ANNOTATIONS_PATH, AUDIO_PATH, DATA_PATH, DETECTIONS_PATH
  from .test_evaluation_notes import ANNOTATIONS
label_desc: Use image node_id 2 for calling the TestQuantizeEventsFunction obj's underlying member method code with example usage: obj.test_length() without return types