code: def on_resize(e):
      width, height = e.size[0], e.size[1]
      gloo.set_viewport(0, 0, width, height)
      paths["viewport"] = 0, 0, width, height
  
imports: from vispy import app, gloo
  from vispy.util import load_data_file
  from vispy.util.svg import Document
  from vispy.visuals.collections import PathCollection, PolygonCollection
  from vispy.visuals.transforms import PanZoomTransform
label_desc: Use image node_id 2 for calling a global function with example usage: on_resize(e) without return types