private static void addJigsawModule(@NotNull Module from,
                                      @NotNull Module to,
                                      @NotNull DependencyScope scope) {
    PsiJavaModule toModule = ReadAction.compute(() -> JavaModuleGraphUtil.findDescriptorByModule(to, scope == DependencyScope.TEST));
    addJigsawModule(from, toModule, scope);
  }
private static void addJigsawModule(@NotNull Module from,
                                      @NotNull Module to,
                                      @NotNull DependencyScope scope)