code: def test_rounding(self):
      # rounding towards next even number
      quantized = quantize_notes([[0.95, 0], [1.95, 1]], fps=10)
      self.assertTrue(
          np.allclose(np.nonzero(quantized), [[10, 20], [0, 1]])
      )
      quantized = quantize_notes([[0.85, 0], [1.85, 1]], fps=10)
      self.assertTrue(
          np.allclose(np.nonzero(quantized), [[8, 18], [0, 1]])
      )
      # round down
      quantized = quantize_notes([[0.9499999, 0]], fps=10)
      self.assertTrue(np.allclose(np.nonzero(quantized), [[9], [0]]))
      # with length
      quantized = quantize_notes(
          [[0.95, 0], [1.95, 1]], fps=10, length=15
      )
      self.assertTrue(np.allclose(np.nonzero(quantized), [[10], [0]]))
  
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 TestQuantizeNotesFunction obj's underlying member method code with example usage: obj.test_rounding() without return types