Python Replace Class Method Json Beautifier Code