def _dict_to_json_pretty(d, sort_keys=True):
 return json.dumps(d, indent=4, separators=(',', ': '), sort_keys=sort_keys)

def _dict_to_json_pretty ( d , sort_keys = True ) : return json . dumps ( d , indent = 4 , separators = ( ',' , ': ' ) , sort_keys = sort_keys )
helper function to generate pretty printed json output .