code: def directory_compare_from_hash(from_directory, to_directory):
      
      from_directory = dict([(os.path.normpath(path), (filehash, stat)) for path, (filehash, stat) in from_directory.items()])
      to_directory = dict([(os.path.normpath(path), (filehash, stat)) for path, (filehash, stat) in to_directory.items()])
  
      to_upload = []
      to_delete = []
      for path, (filehash, stat) in from_directory.items():
          if not path in to_directory or to_directory[path] != (filehash, stat):
              to_upload.append(path)
      for path in to_directory:
          if path not in from_directory:
              to_delete.append(path)
      return (to_upload, to_delete)
docs: :param from_directory: dict in the form {file: (hash of the file, stat of the file)} from directory_content_with_hash
      :param to_directory: dict in the form {file: (hash of the file, stat of the file)} from directory_content_with_hash
      :return: a tuple containing two list: the files that should be uploaded to "to_directory" and the files that should be removed from "to_directory"