code: def safeStr(obj):
      try:
          s = str(obj)
      except Exception:
          try:
              s = repr(obj)
          except Exception:
              s = "<instance of %s at 0x%x>" % (
                  safeStr(type(obj)),
                  id(obj),
              )
      return s
  
file_path: pyqtgraph/pyqtgraph/reload.py
imports: from __future__ import print_function
  import gc
  import inspect
  import os
  import sys
  import traceback
  import types
  from .debug import printExc
label_desc: Use image node_id 5 for calling a global function with example usage: safeStr(obj) and returns: s