def _get_pretty_string(obj):
 sio = StringIO()
 pprint.pprint(obj, stream=sio)
 return sio.getvalue()

def _get_pretty_string ( obj ) : sio = StringIO ( ) pprint . pprint ( obj , stream = sio ) return sio . getvalue ( )
return a prettier version of obj parameters obj : object object to pretty print returns s : str pretty print object repr .