code: def cycle_state(states, index):
      new_index = (index + 1) % len(states)
      return states[new_index], new_index
  
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 2 for calling a global function with example usage: cycle_state(states, index) and returns: states,  new_index