code: def on_key_press(event):
      if event.key == "k":
          k = next(k_names)
          image.custom_kernel = kernels[k]
          canvas.title = f"Custom sampling with {k} kernel"
          canvas.update()
  
file_path: vispy/examples/scene/image_custom_kernel.py
imports: import sys
  from itertools import cycle
  from vispy import scene
  from vispy import app
  from vispy.io import load_data_file, read_png
  from scipy.signal.windows import gaussian
  from scipy.ndimage import gaussian_filter
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: on_key_press(event) without return types