private static boolean isLocalBranch(Listing listing, Instruction instr, FlowType flowType) {
		// if not a jump instruction, or is a conditional jump, not local branch
		if (!flowType.isJump() || flowType.isConditional()) {
			return false;
		}

		Address[] flows = instr.getFlows();
		if (flows.length != 1) {
			// no branch, or more than one branch is not local
			return false;
		}

		// if not in same address space, can't be a local branch
		Address minAddress = instr.getMinAddress();
		if (!minAddress.hasSameAddressSpace(flows[0])) {
			return false;
		}

		// allow a jump of 8 bytes forward to allow for an embedded address
		if (Math.abs(flows[0].subtract(instr.getMinAddress())) <= 8) {
			return true;
		}

		return false;
	}
Handle conversion of label within reserved EXTERNAL block to a real 
external function which can be thunked.  This may be necessary when a
loaded symbol failed to identify itself as a function.  This will 
only handle single symbols contained within the global namespace.

@param program the program
@param entry function being created
@return newly created external function address or null
Ghidra/Features/Base/src/main/java/ghidra/app/cmd/function/CreateThunkFunctionCmd.java