private static boolean isEntry(CodeBlock codeBlock) {
		boolean isSource = true;
		try {
			CodeBlockReferenceIterator iter = codeBlock.getSources(TaskMonitor.DUMMY);
			while (iter.hasNext()) {
				isSource = false;
				if (iter.next().getFlowType().isCall()) {
					// any calls into a code block will make it an 'entry'
					return true;
				}
			}
		}
		catch (CancelledException e) {
			// will never happen, because I don't have a monitor
		}
		return isSource;
	}
Creates a new function graph for the given function

@param function the function to graph
@param controller the controller needed by the function graph
@param program the function's program
@param monitor the task monitor
@return the new graph
@throws CancelledException if the task is cancelled via the monitor
Ghidra/Features/FunctionGraph/src/main/java/ghidra/app/plugin/core/functiongraph/graph/FunctionGraphFactory.java