public DirectedGraph inducedSubgraph(Vertex[] vertexSet) {
		DirectedGraph newGraph = new DirectedGraph(vertexSet.length, this.numEdges());
		for (Vertex element : vertexSet) {
			if (this.contains(element)) {
				newGraph.add(element);
			}
		}
		GraphIterator<Edge> ei = this.edgeIterator();
		Edge e;
		while (ei.hasNext()) {
			e = ei.next();
			if (newGraph.contains(e.from()) && newGraph.contains(e.to())) {
				newGraph.add(e);
			}
		}
		return newGraph;
	}
Returns the directed graph which is subgraph induced by the given
 set of vertices. The vertex set of the returned graph contains the
 given vertices which belong to this graph. An edge of this graph
 is in the returned graph iff both endpoints belong to the given vertices.
Ghidra/Framework/Generic/src/main/java/ghidra/util/graph/DirectedGraph.java