private static boolean functionIsExternal(Function function) {
		Memory mem = function.getProgram().getMemory();
		Address entryPoint = function.getEntryPoint();
		if (function.isExternal() || !mem.contains(entryPoint)) {
			return true;
		}
		MemoryBlock block = function.getProgram().getMemory().getBlock(entryPoint);
		return block == null || !block.isInitialized() || block.isExternalBlock();
	}
Returns whether a function is external.
@param function the function
@return whether the function is external
Ghidra/Features/FunctionID/src/main/java/ghidra/feature/fid/service/FidServiceLibraryIngest.java