def METHOD_NAME(curr_prefs: Preferences, new_prefs: Preferences) -> None:
    new_style_doc_ids = set(new_prefs.style_doc_ids) - set(curr_prefs.style_doc_ids)
    if not new_style_doc_ids:
        return
    new_style_docs: list[DocEntry] = DocEntry.query.filter(
        DocEntry.id.in_(new_style_doc_ids)
    ).all()
    if len(new_style_docs) != len(new_style_doc_ids):
        raise NotExist("Some style docs could not be found")
    for doc in new_style_docs:
        if not is_style_doc(doc):
            raise RouteException(f"Document {doc.path} is not a style document")
        verify_view_access(doc)