private boolean isRoot(AttributedVertex vertex) {
		// Prevent the exception thrown by the graphing library if the given node is not in the
		// graph. This can happen during graph transitions.
		if (!graph.containsVertex(vertex)) {
			return false;
		}
		Set<AttributedEdge> incomingEdgesOf = graph.incomingEdgesOf(vertex);
		return incomingEdgesOf.isEmpty() ||
			graph.incomingEdgesOf(vertex).equals(graph.outgoingEdgesOf(vertex));
	}
Determines if a vertex is a root.  For our purpose, a root either has no incoming edges
or if all edges of a vertex are 'loop' edges
@param vertex the vertex to test if it is a root
@return true if the vertex is a root
Ghidra/Features/GraphServices/src/main/java/ghidra/graph/visualization/DefaultGraphDisplay.java