def represent(obj, prefix, parent="<STR_LIT>", indent=<NUM_LIT:0>, context=False, max_cols=<NUM_LIT>):
try:<EOL><INDENT>name = getattr(obj, "<STR_LIT:name>", "<STR_LIT>")<EOL>class_name = "<STR_LIT>" % (prefix, obj.__class__.__name__)<EOL>padding = len(class_name) + <NUM_LIT:1> + indent * <NUM_LIT:4> + (<NUM_LIT:5> if context else <NUM_LIT:0>)<EOL>params = []<EOL>for (k, spec) in sorted(list(obj._meta.specs.items()), key=get_sort_key):<EOL><INDENT>if k == "<STR_LIT:index>":        <EOL><INDENT>continue            <EOL><DEDENT>if k == "<STR_LIT>" and parent != "<STR_LIT>":<EOL><INDENT>v = parent<EOL><DEDENT>else:<EOL><INDENT>v = getattr(obj, k, "<STR_LIT>")<EOL>if (not isinstance(spec, InternalSpec) <EOL>and v != spec.default<EOL>and (k != '<STR_LIT:id>' or v > <NUM_LIT:0>) <EOL>and isinstance(v, <EOL>(str, int, float, bool, dict, list, <EOL>decimal.Decimal, <EOL>datetime.datetime, datetime.date, datetime.time,<EOL>Font, Color))                <EOL>and repr(v) != '<STR_LIT:None>'<EOL>):<EOL><INDENT>v = repr(v)<EOL><DEDENT>else:<EOL><INDENT>v = None<EOL><DEDENT><DEDENT>if v is not None:<EOL><INDENT>params.append("<STR_LIT>" % (k, v)) <EOL><DEDENT><DEDENT>param_lines = []<EOL>line = "<STR_LIT>"<EOL>for param in params:<EOL><INDENT>if len(line + param) + <NUM_LIT:3> > max_cols - padding:<EOL><INDENT>param_lines.append(line)<EOL>line = "<STR_LIT>"<EOL><DEDENT>line += param + "<STR_LIT:U+002CU+0020>"<EOL><DEDENT>param_lines.append(line)<EOL>param_str = ("<STR_LIT>" % ("<STR_LIT:U+0020>" * padding)).join(param_lines)<EOL>return "<STR_LIT>" % (class_name, param_str)<EOL><DEDENT>except:<EOL><INDENT>raise<EOL>return object.__repr__(obj)<EOL><DEDENT>
Construct a string representing the object