code: def callback(self, verts):
      data = self.collection.get_offsets()
      self.collection.set_array(path.Path(verts).contains_points(data))
      canvas = self.collection.figure.canvas
      canvas.draw_idle()
      del self.lasso
  
file_path: matplotlib/galleries/examples/event_handling/lasso_demo.py
imports: import matplotlib.pyplot
  import numpy
  from matplotlib import colors
  from matplotlib import path
  from matplotlib.collections import RegularPolyCollection
  from matplotlib.widgets import Lasso
label_desc: Use image node_id 2 for calling the LassoManager obj's underlying member method code with example usage: obj.callback(verts) without return types