public FunctionDB createExternalFunction(Address extSpaceAddr, String name, Namespace nameSpace,
			String originalImportName, Address externalProgramAddress, SourceType source)
			throws InvalidInputException {
		lock.acquire();
		try {
			FunctionSymbol symbol = symbolMgr.createExternalFunctionSymbol(extSpaceAddr, name,
				nameSpace, source, originalImportName, externalProgramAddress);

			long returnDataTypeId = program.getDataTypeManager().getResolvedID(DataType.DEFAULT);

			DBRecord rec = adapter.createFunctionRecord(symbol.getID(), returnDataTypeId);

			FunctionDB funcDB = new FunctionDB(this, cache, addrMap, rec);

			program.setObjChanged(ProgramEvent.FUNCTION_ADDED, extSpaceAddr, funcDB, null, null);
			return funcDB;
		}
		catch (IOException e) {
			dbError(e); // will not return
			return null;
		}
		finally {
			lock.release();
		}
	}
Transform an existing external symbol into an external function.
This method should only be invoked by the Function Manager.
The {@link ExternalLocation#getOriginalImportedName() original imported name} will initially 
be null.

@param extSpaceAddr the external space address to use when creating this external.  Any 
other symbol using this address must first be deleted.  Results are unpredictable if this is 
not done.
@param name the external function name
@param nameSpace the external function namespace
@param externalProgramAddress the external program address (may be null)
@param originalImportName the original imported name if different from name (may be null)
@param source the source of this external.
@return external function
@throws InvalidInputException if the name is invalid
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/function/FunctionManagerDB.java