code: def set_file_mtime(path, mtime, atime=None):
    
    if not atime:
      atime = mtime
    f = open(path, 'a')
    try:
      os.utime(path, (atime, mtime))
    finally:
      f.close()
docs: Set access and modification times on a file.