private static @Nullable String getExternalSystemLibraryVersion(@NotNull Module module, @NotNull String mavenCoords) {
    Ref<String> result = new Ref<>();
    OrderEnumerator.orderEntries(module).recursively()
      .forEachLibrary(library -> {
        MavenCoordinates coordinates = getMavenCoordinates(library);
        if (coordinates != null) {
          String location = coordinates.getGroupId() + ":" + coordinates.getArtifactId();
          if (location.equals(mavenCoords)) {
            result.set(coordinates.getVersion());
            return false;
          }
        }
        return true;
      });
    return result.get();
  }
private static @Nullable String getExternalSystemLibraryVersion(@NotNull Module module, @NotNull String mavenCoords)