public static GroupVertex groupVertices(Collection<AttributedVertex> vertices) {

		// the set of vertices given may include group nodes, we only want "real nodes"
		Set<AttributedVertex> set = flatten(vertices);
		List<AttributedVertex> list = new ArrayList<>(set);
		Collections.sort(list, Comparator.comparing(AttributedVertex::getName));
		return new GroupVertex(set, getUniqueId(list), list.get(0));
	}
Creates a new GroupVertex that represents the grouping of the given vertices.
@param vertices the nodes to be grouped.
@return a new GroupVertex.
Ghidra/Features/GraphServices/src/main/java/ghidra/graph/visualization/GroupVertex.java