private void addControlFlowFeatureGraph(Integer baseBlockIndex, AttributedGraph graph) {

		Map<Integer, AttributedVertex> indicesToVertices = new HashMap<>();
		HighFunction hfunction = provider.getModel().getHighFunction();
		ArrayList<PcodeBlockBasic> bBlocks = hfunction.getBasicBlocks();
		PcodeBlockBasic baseBlock = bBlocks.get(baseBlockIndex);
		if (baseBlock.getStart() == null || baseBlock.getStop() == null) {
			Msg.info(this, "null base block: baseBlockIndex " + baseBlockIndex);
			return;
		}

		AttributedVertex baseBlockVertex = graph.addVertex(
			BSimFeatureGraphType.CONTROL_FLOW_PREFIX + Integer.toString(baseBlockIndex));
		setVertexTypeAndAttributes(baseBlockVertex, baseBlock,
			BSimFeatureGraphType.BASE_BLOCK_VERTEX);
		indicesToVertices.put(baseBlockIndex, baseBlockVertex);

		//add the parents 
		for (int i = 0, numParents = baseBlock.getInSize(); i < numParents; i++) {
			PcodeBlock parentBlock = baseBlock.getIn(i);
			AttributedVertex parentVertex =
				indicesToVertices.computeIfAbsent(parentBlock.getIndex(),
					x -> graph.addVertex(BSimFeatureGraphType.CONTROL_FLOW_PREFIX +
						Integer.toString(parentBlock.getIndex())));
			setVertexTypeAndAttributes(parentVertex, parentBlock,
				BSimFeatureGraphType.PARENT_BLOCK_VERTEX);
			addGraphEdge(graph, parentBlock, parentVertex, baseBlock, baseBlockVertex);

			//add grandparents
			for (int j = 0, numGrandParents = parentBlock.getInSize(); j < numGrandParents; j++) {
				PcodeBlock grandParentBlock = parentBlock.getIn(j);
				AttributedVertex grandParentVertex =
					indicesToVertices.computeIfAbsent(grandParentBlock.getIndex(),
						x -> graph.addVertex(BSimFeatureGraphType.CONTROL_FLOW_PREFIX +
							Integer.toString(grandParentBlock.getIndex())));
				setVertexTypeAndAttributes(grandParentVertex, grandParentBlock,
					BSimFeatureGraphType.GRANDPARENT_BLOCK_VERTEX);
				addGraphEdge(graph, grandParentBlock, grandParentVertex, parentBlock, parentVertex);
			}
			//add the siblings 
			for (int j = 0, numSiblings = parentBlock.getOutSize(); j < numSiblings; j++) {
				PcodeBlock siblingBlock = parentBlock.getOut(j);
				if (siblingBlock.equals(baseBlock)) {
					continue;
				}
				AttributedVertex siblingVertex =
					indicesToVertices.computeIfAbsent(siblingBlock.getIndex(),
						x -> graph.addVertex(BSimFeatureGraphType.CONTROL_FLOW_PREFIX +
							Integer.toString(siblingBlock.getIndex())));
				setVertexTypeAndAttributes(siblingVertex, siblingBlock,
					BSimFeatureGraphType.SIBLING_BLOCK_VERTEX);
				addGraphEdge(graph, parentBlock, parentVertex, siblingBlock, siblingVertex);
			}
		}
		//add the children
		for (int i = 0, numChildren = baseBlock.getOutSize(); i < numChildren; i++) {
			PcodeBlock childBlock = baseBlock.getOut(i);
			AttributedVertex childVertex = indicesToVertices.computeIfAbsent(childBlock.getIndex(),
				x -> graph.addVertex(BSimFeatureGraphType.CONTROL_FLOW_PREFIX +
					Integer.toString(childBlock.getIndex())));
			setVertexTypeAndAttributes(childVertex, childBlock,
				BSimFeatureGraphType.CHILD_BLOCK_VERTEX);
			addGraphEdge(graph, baseBlock, baseBlockVertex, childBlock, childVertex);
		}
	}
Returns the {@link AttributedGraph} created by (the last firing of) this action.
@return graph
Ghidra/Features/BSimFeatureVisualizer/src/main/java/ghidra/bsfv/HighlightAndGraphAction.java