Helper functions (Smearing.smart_mode, json_pretty_dump, json_load)