code: def saferepr(object):
      """Version of repr() which can handle recursive data structures."""
      return PrettyPrinter()._safe_repr(object, {}, None, 0)[0]
  
imports: import collections
  import dataclasses
  import re
  import sys
  import types
  from io import StringIO
label_desc: Use image node_id 4 for calling a global function with example usage: saferepr(object) and returns: PrettyPrinter