private static void addJigsawModule(@NotNull Module from,
                                      @Nullable Library library,
                                      @NotNull DependencyScope scope) {
    if (library == null) return;
    PsiJavaModule toModule = ReadAction.compute(() -> JavaModuleGraphUtil.findDescriptorByLibrary(library, from.getProject()));
    addJigsawModule(from, toModule, scope);
  }
private static void addJigsawModule(@NotNull Module from,
                                      @Nullable Library library,
                                      @NotNull DependencyScope scope)