private static @Nullable LibraryDependencyData importModuleLibraryOrderEntry(
    @NotNull LibraryOrderEntry entry,
    @NotNull Map<Set<String>/* library paths */, LibraryDependencyData> moduleLibrariesToImport,
    @NotNull ModifiableRootModel modifiableRootModel,
    @NotNull IdeModifiableModelsProvider modelsProvider
  ) {
    Library library = entry.getLibrary();
    VirtualFile[] libraryFiles = library.getFiles(OrderRootType.CLASSES);
    Set<String> moduleLibraryKey = new HashSet<>(libraryFiles.length);
    for (VirtualFile file : libraryFiles) {
      moduleLibraryKey.add(ExternalSystemApiUtil.getLocalFileSystemPath(file) + entry.getScope().name());
    }
    LibraryDependencyData existing = moduleLibrariesToImport.remove(moduleLibraryKey);
    if (existing == null || !StringUtil.equals(StringUtil.nullize(existing.getInternalName()), library.getName())) {
      modifiableRootModel.removeOrderEntry(entry);
    }
    else {
      syncExistingLibraryDependency(modelsProvider, existing, library, modifiableRootModel, entry.getOwnerModule(), entry);
      return existing;
    }
    return null;
  }
private static @Nullable LibraryDependencyData importModuleLibraryOrderEntry(
    @NotNull LibraryOrderEntry entry,
    @NotNull Map<Set<String>/* library paths */, LibraryDependencyData> moduleLibrariesToImport,
    @NotNull ModifiableRootModel modifiableRootModel,
    @NotNull IdeModifiableModelsProvider modelsProvider
  )