class_docstr: Graphical interface for auditing image comparison tests.
      
docstr: Ask the user to decide whether an image test passes or fails.
  
  This method displays the test image, reference image, and the difference
  between the two. It then blocks until the user selects the test output
  by clicking a pass/fail button or typing p/f. If the user fails the test,
  then an exception is raised.
docstr_tok: ["Ask","the","user","to","decide","whether","an","image","test","passes","or","fails",".","This","method","displays","the","test","image",",","reference","image",",","and","the","difference","between","the","two",".","It","then","blocks","until","the","user","selects","the","test","output","by","clicking","a","pass\/fail","button","or","typing","p\/f",".","If","the","user","fails","the","test",",","then","an","exception","is","raised","."]
code: def test(self, im1, im2, message):
      """Ask the user to decide whether an image test passes or fails.
  
      This method displays the test image, reference image, and the difference
      between the two. It then blocks until the user selects the test output
      by clicking a pass/fail button or typing p/f. If the user fails the test,
      then an exception is raised.
      """
      self.show()
      if im2 is None:
          message += "\nImage1: %s %s   Image2: [no standard]" % (
              im1.shape,
              im1.dtype,
          )
          im2 = np.zeros((1, 1, 3), dtype=np.ubyte)
      else:
          message += "\nImage1: %s %s   Image2: %s %s" % (
              im1.shape,
              im1.dtype,
              im2.shape,
              im2.dtype,
          )
      self.label.setText(message)
  
      self.views[0].image.setImage(im1)
      self.views[1].image.setImage(im2)
      diff = makeDiffImage(im1, im2)
  
      self.views[2].image.setImage(diff)
      self.views[0].autoRange()
  
      while True:
          QtWidgets.QApplication.processEvents()
          lastKey = self.lastKey
  
          self.lastKey = None
          if lastKey in ("f", "esc") or not self.isVisible():
              raise Exception("User rejected test result.")
          elif lastKey == "p":
              break
          time.sleep(0.03)
  
      for v in self.views:
          v.image.setImage(np.zeros((1, 1, 3), dtype=np.ubyte))
  
imports: import inspect
  import os
  import sys
  import time
  from pathlib import Path
  import numpy
  from pyqtgraph import GraphicsLayoutWidget, ImageItem, TextItem
  from pyqtgraph import functions
  from pyqtgraph.Qt import QtCore, QtGui, QtWidgets
label_desc: Use image node_id 2 for calling the ImageTester obj's underlying member method code with example usage: obj.test(im1, im2, message) without return types