private static void replicateProjectModelHierarchyInExternalProjectHierarchy(@NotNull GradleIdeaModelHolder models) {
    for (var buildModel : models.getAllBuilds()) {
      DefaultGradleLightBuild.replicateModelHierarchy(
        buildModel.getRootProject(),
        it -> (DefaultExternalProject)models.getProjectModel(it, ExternalProject.class),
        GradleLightProject::getChildProjects,
        DefaultExternalProject::addChildProject
      );
    }
  }
private static void replicateProjectModelHierarchyInExternalProjectHierarchy(@NotNull GradleIdeaModelHolder models)