code: def on_key_press(self, event):
      if event.key is keys.SPACE:
          if self._timer.running:
              self._timer.stop()
          else:
              self._timer.start()
  
file_path: vispy/examples/demo/gloo/high_frequency.py
imports: from vispy import gloo, app, keys
label_desc: Use image node_id 5 for calling the Canvas obj's underlying member method code with example usage: obj.on_key_press(event) without return types