code: def rmfile(path):
      
      if osp.isfile(path):
          if is_win:
              os.chmod(path, 0o777)
          os.remove(path)
docs: Ensure file deleted also on *Windows* where read-only files need special treatment.