def write_file(path, contents):
os.makedirs(os.path.dirname(path), exist_ok=True)<EOL>with open(path, "<STR_LIT:w>") as file:<EOL><INDENT>file.write(contents)<EOL><DEDENT>
Write contents to a local file.