<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def copyfile_atomic(source_path, dest_path, make_parents=False, backup_suffix=None):
 """ Copy file on local filesystem in an atomic way, so partial copies never exist. Preserves timestamps. """

  with atomic_output_file(dest_path, make_parents=make_parents, backup_suffix=backup_suffix) as tmp_path:
    shutil.copyfile(source_path, tmp_path)
    set_file_mtime(tmp_path, os.path.getmtime(source_path))