public static <V, E extends GEdge<V>> Map<V, Integer> getComplexityDepth(
			GDirectedGraph<V, E> g) {

		Map<V, Integer> map = new HashMap<>();
		List<V> verticesInPostOrder = getVerticesInPostOrder(g, GraphNavigator.topDownNavigator());
		for (V v : verticesInPostOrder) {
			int maxChildLevel = getMaxChildLevel(g, map, v);
			map.put(v, maxChildLevel + 1);
		}

		return map;
	}
Calculates 'complexity depth', which is, for each vertex, the deepest/longest path 
from that vertex for a depth-first traversal.   So, for a vertex with a single 
successor that has no children, the depth would be 1.

@param g the graph
@return the map of each vertex to its complexity depth
Ghidra/Framework/Graph/src/main/java/ghidra/graph/GraphAlgorithms.java