Function createFunction(ExternalLocationDB extLoc) {
		if (extLoc.isFunction()) {
			return extLoc.getFunction();
		}
		lock.acquire();
		try {
			SymbolDB symbol = (SymbolDB) extLoc.getSymbol();
			if (!(symbol instanceof CodeSymbol)) {
				throw new IllegalStateException("Expected external code symbol");
			}
			Address extProgAddr = extLoc.getAddress();
			String origImpName = extLoc.getOriginalImportedName();
			String name = symbol.getName();
			Namespace namespace = symbol.getParentNamespace();
			Address extAddr = symbol.getAddress();
			SourceType source = symbol.getSource();

			((CodeSymbol) symbol).delete(true);

			return functionMgr.createExternalFunction(extAddr, name, namespace, origImpName,
				extProgAddr, source);
		}
		catch (Exception e) {
			throw new RuntimeException("Unexpected exception", e);
		}
		finally {
			lock.release();
		}
	}
Removes the external location at the given external address
@param externalAddr the address at which to remove the external location.
@return true if external location was successfully removed else false
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/external/ExternalManagerDB.java