private void validateAndAddEdge(FGController controller, FunctionGraph functionGraph,
			GroupedFunctionGraphVertex groupedVertex, FGEdge edge) {

		Graph<FGVertex, FGEdge> graph = functionGraph;
		FGVertex startVertex =
			updateEdgeVertexForUngrouping(functionGraph, groupedVertex, edge.getStart());
		FGVertex destinationVertex =
			updateEdgeVertexForUngrouping(functionGraph, groupedVertex, edge.getEnd());
		if (edge.getStart() != startVertex || edge.getEnd() != destinationVertex) {

			// one or both of the original endpoints must have been grouped
			edge = edge.cloneEdge(startVertex, destinationVertex);
		}

		graph.addEdge(edge, startVertex, destinationVertex);
	}
Performs a relayout of the graph currently used by the given controller.
@param controller The controller whose graph should have relayout called
Ghidra/Features/FunctionGraph/src/main/java/ghidra/graph/viewer/FGViewUpdater.java