public ModelGraph build() {
        List<ModelNode> modelNodes = new ArrayList<>();
        for (ConfigModelBuilder<? extends ConfigModel> builder : builders) {
            modelNodes.add(new ModelNode(builder));
        }
        List<ModelNode> roots = new ArrayList<>();
        for (ModelNode modelNode : modelNodes) {
            int numDependencies = modelNode.addDependenciesFrom(modelNodes);
            if (numDependencies == 0) {
                roots.add(modelNode);
            }
        }
        return new ModelGraph(modelNodes, roots);
    }
Build a {@link com.yahoo.config.model.graph.ModelGraph} based on the {@link com.yahoo.config.model.builder.xml.ConfigModelBuilder}s
added to this.

@return A {@link com.yahoo.config.model.graph.ModelGraph} representing the dependency graph.
config-model/src/main/java/com/yahoo/config/model/graph/ModelGraphBuilder.java