code: def on_resize(self, event):
      self.width, self.height = event.size
      self.context.set_viewport(
          0, 0, event.physical_size[0], event.physical_size[1]
      )
  
imports: import numpy
  import math
  from vispy import gloo, app, scene
  from vispy.visuals import Visual
  from vispy.visuals.shaders import Function, Variable
  from vispy.visuals.transforms import TransformSystem, BaseTransform
  from vispy.util.profiler import Profiler
label_desc: Use image node_id 2 for calling the PanZoomCanvas obj's underlying member method code with example usage: obj.on_resize(event) without return types