code: def load_example(name):
      global last_loaded
      if isinstance(name, int):
          code = presets[name][1]
          editor.setText(code)
          last_loaded = name
      else:
          for i, preset in enumerate(presets):
              n, code = preset
              if n == name:
                  editor.setText(code)
                  last_loaded = i
                  return
  
file_path: vispy/examples/basics/scene/modular_shaders/sandbox.py
imports: from PyQt5 import QtCore
  from PyQt5.QtWidgets import *
  import sys
  import traceback
  from editor import Editor, HAVE_QSCI
label_desc: Use image node_id 1 for calling a global function with example usage: load_example(name) without return types