code: def test_fps(self):
      # 10 FPS
      quantized = quantize_events(EVENTS, 10)
      idx = np.nonzero(quantized)[0]
      # tar: [1, 1.02, 1.5, 2.0, 2.03, 2.05, 2.5, 3]
      self.assertTrue(np.allclose(idx, [10, 15, 20, 25, 30]))
      # 100 FPS with numpy arrays (array must not be changed)
      events = np.array(EVENTS)
      events_ = np.copy(events)
      quantized = quantize_events(events, 100)
      idx = np.nonzero(quantized)[0]
      # tar: [1, 1.02, 1.5, 2.0, 2.03, 2.05, 2.5, 3]
      correct = [100, 102, 150, 200, 203, 205, 250, 300]
      self.assertTrue(np.allclose(idx, correct))
      self.assertTrue(np.allclose(events, events_))
  
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 1 for calling the TestQuantizeEventsFunction obj's underlying member method code with example usage: obj.test_fps() without return types