Python3 version of pretty.py from pocoo