private static void replicateBuildModelHierarchyInExternalProjectHierarchy(@NotNull GradleIdeaModelHolder models) {
    var rootBuildModel = models.getRootBuild();
    var rootProjectModel = rootBuildModel.getRootProject();
    var rootExternalProject = (DefaultExternalProject)models.getProjectModel(rootProjectModel, ExternalProject.class);
    if (rootExternalProject == null) return;
    for (var nestedBuildModel : models.getNestedBuilds()) {
      var projectModel = nestedBuildModel.getRootProject();
      var externalProject = (DefaultExternalProject)models.getProjectModel(projectModel, ExternalProject.class);
      if (externalProject == null) continue;
      rootExternalProject.addChildProject(externalProject);
    }
  }
private static void replicateBuildModelHierarchyInExternalProjectHierarchy(@NotNull GradleIdeaModelHolder models)