public AttributedVertex groupSelectedVertices() {
		MutableSelectedState<AttributedVertex> selectedVState = vv.getSelectedVertexState();
		MutableSelectedState<AttributedEdge> selectedEState = vv.getSelectedEdgeState();
		Collection<AttributedVertex> selected = selectedVState.getSelected();
		if (selected.size() > 1) {
			AttributedVertex groupVertex = collapse(selected, s -> GroupVertex.groupVertices(selected));
			selectedVState.clear();
			selectedEState.clear();
			selectedVState.select(groupVertex);
			return groupVertex;
		}
		return null;
	}
Group the selected vertices into one vertex that represents them all

@return the new GroupVertex
Ghidra/Features/GraphServices/src/main/java/ghidra/graph/visualization/GhidraGraphCollapser.java