Python pprint.pformat, for the pprint filter, with its defaults: a width of 80, an indent of 1, and dicts sorted by key.
A value whose repr() fits on its line prints as the repr(). A longer dict, list or tuple puts one item on each line, and a longer string splits into parts at whitespace, like Python.
Summary
Functions
Formats value like pprint.pformat(value).