private AttributedGraph createSubGraph() {
		Set<AttributedVertex> selected = viewer.getSelectedVertices();
		Graph<AttributedVertex, AttributedEdge> subGraph = new AsSubgraph<>(graph, selected);

		AttributedGraph newGraph =
			new AttributedGraph(graph.getName() + ": subgraph", graph.getGraphType());
		subGraph.vertexSet().forEach(newGraph::addVertex);
		for (AttributedEdge e : subGraph.edgeSet()) {
			AttributedVertex source = subGraph.getEdgeSource(e);
			AttributedVertex target = subGraph.getEdgeTarget(e);
			newGraph.addEdge(source, target, e);
		}
		return newGraph;
	}
Ungroup the selected vertices. If the focusedVertex is no longer in the graph, null it. This
will happen if the focusedVertex was the GroupVertex
Ghidra/Features/GraphServices/src/main/java/ghidra/graph/visualization/DefaultGraphDisplay.java