code: def record_exception():
      _, e, tb = sys.exc_info()
      if e is None:
          return
  
      if exception_records and exception_records[-1] == e:
          return
  
      exception_records.append(format_exception(e, tb))
  
      if len(exception_records) > 5:
          exception_records.pop(0)
  
file_path: stable-diffusion-webui/modules/errors.py
imports: import sys
  import textwrap
  import traceback
label_desc: Use image node_id 4 for calling a global function with example usage: record_exception() without return types