def write_json(json_obj, filename, mode="<STR_LIT:w>", print_pretty=True):
with open(filename, mode) as filey:<EOL><INDENT>if print_pretty:<EOL><INDENT>filey.writelines(print_json(json_obj))<EOL><DEDENT>else:<EOL><INDENT>filey.writelines(json.dumps(json_obj))<EOL><DEDENT><DEDENT>return filename<EOL>
write_json will (optionally,pretty print) a json object to file

       Parameters
       ==========
       json_obj: the dict to print to json
       filename: the output file to write to
       pretty_print: if True, will use nicer formatting