code: def getData(randomize=False):
      pos = data["pos"]
      pen = data["pen"]
      size = data["size"]
      brush = data["brush"]
      if not randomize:
          pen = pen[0]
          size = size[0]
          brush = brush[0]
      return dict(
          x=pos[ptr % 50],
          y=pos[(ptr + 1) % 50],
          pen=pen,
          brush=brush,
          size=size,
      )
  
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 4 for calling a global function with example usage: getData(randomize) and returns: dict