def debug_mode(header, data_object, debug=False, halt=False):
if debug:<EOL><INDENT>print('<STR_LIT>' + str(header) + '<STR_LIT:\n>')<EOL>try:<EOL><INDENT>export_json_object(data_object)<EOL><DEDENT>except Exception:<EOL><INDENT>print(data_object)<EOL><DEDENT>if halt:<EOL><INDENT>sys.exit(<NUM_LIT:0>)<EOL><DEDENT><DEDENT>return True<EOL>
debug output