code: def on_resize(event):
      width, height = event.size
      gloo.set_viewport(0, 0, width, height)
      paths["viewport"] = 0, 0, width, height
  
file_path: vispy/examples/collections/chloropleth.py
imports: import json
  import numpy
  from vispy import app, gloo
  from vispy.util import load_data_file
  from vispy.visuals.collections import PathCollection, PolygonCollection
  from vispy.visuals.transforms import PanZoomTransform
label_desc: Use image node_id 4 for calling a global function with example usage: on_resize(event) without return types