private AttributedVertex getDataVertex(AttributedGraph graph, Varnode node,
			TaskMonitor monitor) {

		// TODO: Missing Varnode unique ID ??

		AttributedVertex vertex = null;
		HighVariable var = node.getHigh();
		String key;
		if (var != null) {
			key = "V_" + var.getName();
			vertex = graph.getVertex(key);
		}
		else {
			key = Integer.toString(++uniqueNum);
		}

		if (vertex == null) {
			vertex = graph.addVertex(key, key);
			setVarnodeVertexAttributes(vertex, node);
		}
		return vertex;
	}
Task to create a PCode control flow graph based on decompiler output
Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/PCodeCfgGraphTask.java