public void mergeVertexWithParent(FGController controller, FGVertex childVertex) {

		// For now we do not handle merging when the vertex to merge is a group vertex, which
		// means that the real vertex is inside of the grouped vertex.  The work to update
		// everything does not seem worth the result at this time (the result being an updated
		// group vertex display and proper ungrouping).  For now, the user will just have to
		// hit refresh to see the new vertices, but, they will no longer be grouped.
		if (childVertex instanceof GroupedFunctionGraphVertex) {
			return;
		}

		stopAllAnimation();

		FGView view = controller.getView();
		VisualizationServer<FGVertex, FGEdge> primaryViewer = view.getPrimaryGraphViewer();

		//
		// First: create the new vertex from the given vertex and its parent
		//
		Layout<FGVertex, FGEdge> graphLayout = primaryViewer.getGraphLayout();
		Graph<FGVertex, FGEdge> graph = graphLayout.getGraph();

		// we assume that the client has verified that there is only one fallthrough edge to
		// this vertex
		Collection<FGEdge> parentChildEdges = graph.getInEdges(childVertex);
		FGEdge parentChildEdge = parentChildEdges.iterator().next();
		FGVertex parentVertex = parentChildEdge.getStart();
		if (parentVertex instanceof GroupedFunctionGraphVertex) {
			// see above
			return;
		}

		AddressSet newAddresses = new AddressSet();
		newAddresses.add(parentVertex.getAddresses());
		newAddresses.add(childVertex.getAddresses());

		FlowType flowType = parentVertex.getFlowType();
		boolean isEntry = parentVertex.isEntry();
		FGVertex newVertex =
			new ListingFunctionGraphVertex(controller, newAddresses, flowType, isEntry);

		FGVertexType parentVertexType = parentVertex.getVertexType();
		FGVertexType childVertexType = childVertex.getVertexType();
		if (parentVertexType.isEntry() && childVertexType.isExit()) {
			newVertex.setVertexType(FGVertexType.SINGLETON);
		}
		else if (parentVertexType.isEntry()) {
			newVertex.setVertexType(FGVertexType.ENTRY);
		}
		else if (childVertexType.isExit()) {
			newVertex.setVertexType(FGVertexType.EXIT);
		}
		else {
			newVertex.setVertexType(parentVertexType);
		}

		graph.addVertex(newVertex);

		//
		// Second: add the edges from the two vertices to the new vertex
		//
		// To do this, we have to:
		// -move the edge(s) coming into the parent to the new vertex
		// -move the edge(s) coming out of the child vertex to the new vertex
		//

		// for the parent - first remove...
		Collection<FGEdge> parentInEdges = graph.getInEdges(parentVertex);
		// copy to keep a reference, as given collection is backed by the graph's state
		parentInEdges = new ArrayList<>(parentInEdges);

		// ...now move
		for (FGEdge edge : parentInEdges) {
			FGVertex oldStartVertex = edge.getStart();
			graph.addEdge(edge.cloneEdge(oldStartVertex, newVertex), oldStartVertex, newVertex);
		}

		// for the previous child - first remove...
		Collection<FGEdge> childOutEdges = graph.getOutEdges(childVertex);
		// copy to keep a reference, as given collection is backed by the graph's state
		childOutEdges = new ArrayList<>(childOutEdges);

		// ...now move
		for (FGEdge edge : childOutEdges) {
			FGVertex oldDestinationVertex = edge.getEnd();
			graph.addEdge(edge.cloneEdge(newVertex, oldDestinationVertex), newVertex,
				oldDestinationVertex);
		}

		//
		// Third: Create the animator to smooth the process.  The animator will not
		//        animate if animation is disabled.
		//
		MergeVertexFunctionGraphJob job = new MergeVertexFunctionGraphJob(controller, primaryViewer,
			newVertex, parentVertex, childVertex, isAnimationEnabled());
		scheduleViewChangeJob(job);
	}
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