code: def updatePlot():
      global img, roi, data, p2
      selected = roi.getArrayRegion(data, img)
      p2.plot(selected.mean(axis=0), clear=True)
  
imports: import numpy
  import pyqtgraph
  from pyqtgraph.Qt import QtGui
label_desc: Use image node_id 1 for calling a global function with example usage: updatePlot() without return types