code: def clicked(plot, points):
      global lastClicked
      for p in lastClicked:
          p.resetPen()
      print("clicked points", points)
      for p in points:
          p.setPen(clickedPen)
      lastClicked = points
  
imports: from collections import namedtuple
  import numpy
  import pyqtgraph
  from pyqtgraph.Qt import QtGui, QtWidgets
label_desc: Use image node_id 1 for calling a global function with example usage: clicked(plot, points) without return types