code: def test_rounding(self):
      # without length
      quantized = quantize_events([3.95], 10)
      idx = np.nonzero(quantized)[0]
      self.assertTrue(np.allclose(idx, [40]))
      # with length
      quantized = quantize_events([3.95], 10, length=39)
      idx = np.nonzero(quantized)[0]
      self.assertTrue(np.allclose(idx, []))
      # round down with length
      quantized = quantize_events([3.9499999], 10, length=40)
      idx = np.nonzero(quantized)[0]
      self.assertTrue(np.allclose(idx, [39]))
  
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 3 for calling the TestQuantizeEventsFunction obj's underlying member method code with example usage: obj.test_rounding() without return types