void (@NotNull Module module, @NotNull Library library) { updateModel(module, model -> { LibraryOrderEntry entry = model.findLibraryOrderEntry(library); if (entry == null) { throw new IllegalArgumentException("Library " + library.getName() + " is not found in dependencies of module " + module.getName()); } model.removeOrderEntry(entry); }); }