code: def on_key_press(event):
      global act
      if event.key in ["Left", "Right"]:
          if event.key == "Right":
              step = 1
          else:
              step = -1
          act = (act + step) % len(names)
          interpolation = names[act]
          image.interpolation = interpolation
          canvas.title = (
              "Spatial Filtering using %s Filter" % interpolation
          )
          canvas.update()
  
imports: import sys
  from vispy import scene
  from vispy import app
  from vispy.io import load_data_file, read_png
label_desc: Use image node_id 1 for calling a global function with example usage: on_key_press(event) without return types