code: def on_resize(canvas, vb, event):
      vb.pos = 1, 1
      vb.size = (canvas.size[0] - 2, canvas.size[1] - 2)
  
file_path: vispy/examples/tutorial/app/shared_context.py
imports: from PyQt5 import QtWidgets, QtCore
  from functools import partial
  from vispy.app import Timer
  from vispy.scene.visuals import Text
  from vispy.scene.widgets import ViewBox
  from vispy.scene import SceneCanvas
label_desc: Use image node_id 1 for calling a global function with example usage: on_resize(canvas, vb, event) without return types