code: def update(mode="Reuse Item"):
      global ptr
  
      if next(iterations_counter) > args.iterations:
          timer.stop()
          app.quit()
          return None
      if mode == "New Item":
          mkItem()
      elif mode == "Reuse Item":
          item.setData(**getData())
      elif mode == "Simulate Pan/Zoom":
          item.viewTransformChanged()
          item.update()
      elif mode == "Simulate Hover":
          pts = item.points()
          old = pts[(ptr - 1) % len(pts)]
          new = pts[ptr % len(pts)]
          item.pointsAt(new.pos())
          old.resetBrush()  # reset old's brush before setting new's to better simulate hovering
          new.setBrush(hoverBrush)
      ptr += 1
      framecnt.update()
  
file_path: pyqtgraph/pyqtgraph/examples/ScatterPlotSpeedTest.py
imports: import argparse
  import itertools
  import re
  import numpy
  from utils import FrameCounter
  import pyqtgraph
  import pyqtgraph.parametertree
  from pyqtgraph.Qt import QtCore, QtWidgets
label_desc: Use image node_id 5 for calling a global function with example usage: update(mode) and returns: None