code: def on_key_press(event):
      global mode_index
      if event.key not in ["Left", "Right"]:
          return
  
      if event.key == "Right":
          step = 1
      else:
          step = -1
      mode_index = (mode_index + step) % len(complex_modes)
      complex_mode = complex_modes[mode_index]
      image.complex_mode = complex_mode
      canvas.title = f"Complex number view: {complex_mode}"
      canvas.update()
  
imports: import sys
  import numpy
  from vispy import app, scene
label_desc: Use image node_id 2 for calling a global function with example usage: on_key_press(event) without return types