code: def test_shift(self):
      # no length
      quantized = quantize_events(EVENTS, 10, shift=1)
      idx = np.nonzero(quantized)[0]
      self.assertTrue(np.allclose(idx, [20, 25, 30, 35, 40]))
      # limited length
      quantized = quantize_events(EVENTS, 10, shift=1, length=35)
      idx = np.nonzero(quantized)[0]
      correct = [20, 25, 30]
      self.assertTrue(np.allclose(idx, correct))
  
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 4 for calling the TestQuantizeEventsFunction obj's underlying member method code with example usage: obj.test_shift() without return types