code: def on_key_press(event):
      global colors
      if event.key == "p":
          # toggle face picking view
          picking_filter.enabled = not picking_filter.enabled
          markers.update_gl_state(blend=not picking_filter.enabled)
          markers.update()
      if event.key == "r":
          # reset marker symbols
          colors = _colors.copy()
          markers.set_data(
              pos=pos,
              edge_color=EDGE_COLOR,
              face_color=colors,
              size=MARKER_SIZE,
              edge_width=EDGE_WDITH,
          )
  
file_path: vispy/examples/scene/marker_picking.py
imports: import random
  import time
  import numpy
  from scipy.constants import golden
  from vispy import app, scene
  from vispy.scene.visuals import Markers
  from vispy.visuals.filters import MarkerPickingFilter
label_desc: Use image node_id 3 for calling a global function with example usage: on_key_press(event) without return types