code: def on_draw(self, event):
      self.context.clear("white")
      self.visual.draw()
      if not self.visual.animate_layout():
          self.update()
  
file_path: vispy/examples/basics/visuals/graph.py
imports: import sys
  import networkx
  from vispy import app, visuals
  from vispy.visuals.graphs import layouts
  from vispy.visuals.transforms import STTransform
label_desc: Use image node_id 4 for calling the Canvas obj's underlying member method code with example usage: obj.on_draw(event) without return types