private void createNewGroupedEdges(FGController controller,
			GroupedFunctionGraphVertex groupVertex, Set<FGEdge> ungroupedEdges) {

		FGData functionGraphData = controller.getFunctionGraphData();
		FunctionGraph graph = functionGraphData.getFunctionGraph();

		Set<FGVertex> vertices = groupVertex.getVertices();

		for (FGEdge edge : ungroupedEdges) {
			FGVertex startVertex = edge.getStart();
			if (vertices.contains(startVertex)) {
				continue; // start vertex is in the group--can't be an incoming edge
			}

			if (!graph.containsVertex(startVertex)) {
				// must have been grouped--go find the containing group
				startVertex = graph.findMatchingVertex(startVertex);
				if (vertices.contains(startVertex)) {
					continue; // the *group* has been grouped!--can't be an incoming edge
				}
			}

			if (startVertex == groupVertex) {
				continue; // the start vertex now lives inside of the current group vertex--ignore
			}

			FGEdge clonedEdge = edge.cloneEdge(startVertex, groupVertex);
			graph.addEdge(clonedEdge, startVertex, groupVertex);
		}

		for (FGEdge edge : ungroupedEdges) {
			FGVertex destinationVertex = edge.getEnd();
			if (vertices.contains(destinationVertex)) {
				continue; // destination vertex is in the group--can't be an outgoing edge
			}

			if (!graph.containsVertex(destinationVertex)) {
				// must have been grouped
				destinationVertex = graph.findMatchingVertex(destinationVertex);
				if (vertices.contains(destinationVertex)) {
					continue; // the *group* has been grouped!--can't be an incoming edge
				}
			}

			if (destinationVertex == groupVertex) {
				continue; // the destination vertex now lives inside of the current group vertex--ignore
			}

			FGEdge clonedEdge = edge.cloneEdge(groupVertex, destinationVertex);
			graph.addEdge(clonedEdge, groupVertex, destinationVertex);
		}

	}
Install the given grouped vertex into the graph, optionally animating the process.

@param controller the controller of the graph to be ungrouped
@param groupVertex The group vertex to be ungrouped
@param groupVertexLocation The default groupVertex location (only used if not
							  performing a relayout).
@param relayoutOverride true signals to always relayout the graph after grouping; false
                        indicates to use the tool's options to decide
@param animate whether to animate
@return true if the given group was added to the graph
Ghidra/Features/FunctionGraph/src/main/java/ghidra/graph/viewer/FGViewUpdater.java