def safe_repr(obj):
try:<EOL><INDENT>obj_repr = repr(obj)<EOL><DEDENT>except:<EOL><INDENT>obj_repr = "<STR_LIT>".format(type(obj), id(obj))<EOL><DEDENT>return obj_repr<EOL>
Returns a repr of an object and falls back to a minimal representation of type and ID if the call to repr raised
    an error.

    :param obj: object to safe repr
    :returns: repr string or '(type<id> repr error)' string
    :rtype: str