code: def on_resize(self, event):
      # Set canvas viewport and reconfigure visual transforms to match.
      vp = (0, 0, self.physical_size[0], self.physical_size[1])
      self.context.set_viewport(*vp)
  
      for vis in self.visuals:
          vis.transforms.configure(canvas=self, viewport=vp)
  
file_path: vispy/examples/basics/visuals/dynamic_polygon.py
imports: import sys
  import numpy
  from vispy import app, visuals
  from vispy.visuals import transforms
label_desc: Use image node_id 3 for calling the Canvas obj's underlying member method code with example usage: obj.on_resize(event) without return types