code: def _call_and_format_exception(call, x, *args):
      try:
          # Try the vanilla repr and make sure that the result is a string
          return call(x, *args)
      except Exception as exc:
          exc_name = type(exc).__name__
          try:
              exc_info = str(exc)
          except Exception:
              exc_info = "unknown"
          return '<[%s("%s") raised in repr()] %s object at 0x%x>' % (
              exc_name,
              exc_info,
              x.__class__.__name__,
              id(x),
          )
  
file_path: catboost/contrib/python/pytest/py2/_pytest/_io/saferepr.py
imports: import pprint
  from six.moves import reprlib
label_desc: Use image node_id 1 for calling a global function with example usage: _call_and_format_exception(call, x) and returns: call, unknown