private AttributedVertex getBlockVertex(AttributedGraph graph, PcodeBlock pblock,
			TaskMonitor monitor) {

		String key = Integer.toString(pblock.getIndex());
		AttributedVertex vertex = graph.getVertex(key);

		if (vertex == null) {
			vertex = graph.addVertex(key, key);
			if (pblock instanceof PcodeBlockBasic) {
				setBlockVertexAttributes(vertex, (PcodeBlockBasic) pblock);
			}
			else {
				vertex.setAttribute(CODE_ATTRIBUTE, "<???>");
				vertex.setVertexType(BAD);
			}
		}
		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