private static Map<FGVertex, FGVertex> cloneVertices(Collection<FGVertex> vertices,
			FGController newController) {

		Map<FGVertex, FGVertex> map = new HashMap<>();

		for (FGVertex vertex : vertices) {
			FGVertex newVertex = vertex.cloneVertex(newController);
			map.put(vertex, newVertex);
		}

		return map;
	}
Clones the given function graph, creating a new graph with cloned versions of each
vertex and edge. 

@param data the data of the current graph
@param newController controller for the new graph
@return a new data object containing the new graph
Ghidra/Features/FunctionGraph/src/main/java/ghidra/app/plugin/core/functiongraph/graph/FunctionGraphFactory.java