code: def on_press(self, event):
      canvas = self.collection.figure.canvas
      if (
          event.inaxes is not self.collection.axes
          or canvas.widgetlock.locked()
      ):
          return
      self.lasso = Lasso(
          event.inaxes, (event.xdata, event.ydata), self.callback
      )
      canvas.widgetlock(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 3 for calling the LassoManager obj's underlying member method code with example usage: obj.on_press(event) without return types