code: def registerCallback(fn):
      """Register a callable to be invoked when there is an unhandled exception.
      The callback will be passed an object with attributes: [exc_type, exc_value, exc_traceback, thread]
      (see threading.excepthook).
      Multiple callbacks will be invoked in the order they were registered.
      """
      callbacks.append(fn)
  
file_path: pyqtgraph/pyqtgraph/exceptionHandling.py
imports: import sys
  import threading
  import time
  import traceback
  from types import SimpleNamespace
label_desc: Use image node_id 1 for calling a global function with example usage: registerCallback(fn) without return types