private static @NotNull ExternalProject getExternalProject(
    @NotNull ProjectResolverContext context,
    @NotNull IdeaModule gradleModule
  ) {
    ExternalProject externalProject = context.getProjectModel(gradleModule, ExternalProject.class);
    if (externalProject == null) {
      throw new IllegalStateException(
        "Missing " + ExternalProject.class.getSimpleName() + " for " + gradleModule.getProjectIdentifier().getProjectPath()
      );
    }
    return externalProject;
  }
private static @NotNull ExternalProject getExternalProject(
    @NotNull ProjectResolverContext context,
    @NotNull IdeaModule gradleModule
  )