code: def select_callback(eclick, erelease):
      """
      Callback for line selection.
  
      *eclick* and *erelease* are the press and release events.
      """
      x1, y1 = eclick.xdata, eclick.ydata
      x2, y2 = erelease.xdata, erelease.ydata
      print(f"({x1:3.2f}, {y1:3.2f}) --> ({x2:3.2f}, {y2:3.2f})")
      print(
          f"The buttons you used were: {eclick.button} {erelease.button}"
      )
  
imports: import matplotlib.pyplot
  import numpy
  from matplotlib.widgets import EllipseSelector, RectangleSelector
label_desc: Use image node_id 1 for calling a global function with example usage: select_callback(eclick, erelease) without return types