code: def update():
      global ptr
      if next(iterations_counter) > args.iterations:
          # cleanly close down benchmark
          timer.stop()
          app.quit()
          return None
  
      if ui.lutCheck.isChecked():
          useLut = LUT
      else:
          useLut = None
  
      downsample = ui.downsampleCheck.isChecked()
  
      if ui.scaleCheck.isChecked():
          if ui.rgbLevelsCheck.isChecked():
              useScale = [
                  [ui.minSpin1.value(), ui.maxSpin1.value()],
                  [ui.minSpin2.value(), ui.maxSpin2.value()],
                  [ui.minSpin3.value(), ui.maxSpin3.value()],
              ]
          else:
              useScale = [ui.minSpin1.value(), ui.maxSpin1.value()]
      else:
          useScale = None
  
      if ui.rawRadio.isChecked():
          ui.rawImg.setImage(
              data[ptr % data.shape[0]], lut=useLut, levels=useScale
          )
          ui.stack.setCurrentIndex(1)
      elif ui.rawGLRadio.isChecked():
          ui.rawGLImg.setImage(
              data[ptr % data.shape[0]], lut=useLut, levels=useScale
          )
          ui.stack.setCurrentIndex(2)
      else:
          img.setImage(
              data[ptr % data.shape[0]],
              autoLevels=False,
              levels=useScale,
              lut=useLut,
              autoDownsample=downsample,
          )
          ui.stack.setCurrentIndex(0)
          # img.setImage(data[ptr%data.shape[0]], autoRange=False)
  
      ptr += 1
      framecnt.update()
  
file_path: pyqtgraph/pyqtgraph/examples/VideoSpeedTest.py
imports: import argparse
  import itertools
  import sys
  import numpy
  from utils import FrameCounter
  import pyqtgraph
  from pyqtgraph.Qt import QtCore, QtGui, QtWidgets
  import VideoTemplate_generic
label_desc: Use image node_id 7 for calling a global function with example usage: update() and returns: None