public IntegerAttribute<Vertex> complexityDepth() {
		IntegerAttribute<Vertex> complexityDepth;
		if (vertexAttributes.hasAttributeNamed("ComplexityDepth")) {
			complexityDepth =
				(IntegerAttribute<Vertex>) vertexAttributes.getAttribute("ComplexityDepth");
			complexityDepth.clear();
		}
		else {
			complexityDepth =
				(IntegerAttribute<Vertex>) vertexAttributes.createAttribute("ComplexityDepth",
					AttributeManager.INTEGER_TYPE);
		}
		DepthFirstSearch dfs = new DepthFirstSearch(this, this.getSources(), true, true, false);
		Vertex[] topologicalSort = dfs.topologicalSort();
		int numVertices = this.numVertices();
		int i, maxChildLevel, maximumLevel = -1;
		Vertex v, child;
		Set<Vertex> children;
		try {
			for (i = 0; i < numVertices; i++) {
				complexityDepth.setValue(topologicalSort[i], -1);
			}
			for (i = numVertices - 1; i >= 0; i--) {
				v = topologicalSort[i];
				children = this.getChildren(v);
				maxChildLevel = -1;
				Iterator<Vertex> iter = children.iterator();
				while (iter.hasNext()) {
					child = iter.next();
					if (complexityDepth.getValue(child) > maxChildLevel) {
						maxChildLevel = complexityDepth.getValue(child);
					}
				}
				complexityDepth.setValue(v, maxChildLevel + 1);
				if (maxChildLevel + 1 > maximumLevel) {
					maximumLevel = maxChildLevel + 1;
				}
			}
		}
		catch (ghidra.util.exception.NoValueException exc) {
			Msg.error(this, "Bad get/set in complexityDepth()");
		}
		return complexityDepth;
	}
Assigns levels to the graph in a bottom up fashion. All sinks have the
 same level.
Ghidra/Framework/Generic/src/main/java/ghidra/util/graph/DirectedGraph.java