code: def on_key_press(event):
      global shading_state_index
      global wireframe_state_index
      if event.key == "s":
          state, shading_state_index = cycle_state(
              shading_states, shading_state_index
          )
          for attr, value in state.items():
              setattr(shading_filter, attr, value)
          mesh.update()
      elif event.key == "w":
          wireframe_filter.enabled = not wireframe_filter.enabled
          mesh.update()
      elif event.key == "f":
          state, wireframe_state_index = cycle_state(
              wireframe_states, wireframe_state_index
          )
          for attr, value in state.items():
              setattr(wireframe_filter, attr, value)
          mesh.update()
  
file_path: vispy/examples/scene/mesh_shading.py
imports: import argparse
  from vispy import app, scene
  from vispy.io import read_mesh, load_data_file
  from vispy.scene.visuals import Mesh
  from vispy.scene import transforms
  from vispy.visuals.filters import ShadingFilter, WireframeFilter
label_desc: Use image node_id 3 for calling a global function with example usage: on_key_press(event) without return types