private DataType getResultDataType(ExternalLocation fromExternalLocation) {
		if (fromExternalLocation == null) {
			return null;
		}
		DataType fromDataType = fromExternalLocation.getDataType();
		if (fromDataType == null || fromDataType == DataType.DEFAULT) {
			return fromDataType;
		}
		DataTypeManager latestDTM = programs[LATEST].getDataTypeManager();
		DataTypeManager myDTM = programs[MY].getDataTypeManager();
		DataTypeManager originalDTM = programs[ORIGINAL].getDataTypeManager();
		DataTypeManager fromDataTypeManager = fromDataType.getDataTypeManager();
		if (fromDataTypeManager == latestDTM) {
			long latestID = latestDTM.getID(fromDataType);
			DataType latestResultDT = getResultDataType(latestID, programs[LATEST]);
			if (latestResultDT != null) {
				return latestResultDT;
			}
		}
		if (fromDataTypeManager == myDTM) {
			long myID = myDTM.getID(fromDataType);
			DataType myResultDT = getResultDataType(myID, programs[MY]);
			if (myResultDT != null) {
				return myResultDT;
			}
		}
		if (fromDataTypeManager == originalDTM) {
			long originalID = originalDTM.getID(fromDataType);
			DataType originalResultDT = getResultDataType(originalID, programs[ORIGINAL]);
			if (originalResultDT != null) {
				return originalResultDT;
			}
		}
		return fromDataType;
	}
@param entry
@param type (FUNC_RETURN_TYPE, FUNC_RETURN_ADDRESS_OFFSET,
FUNC_PARAMETER_OFFSET, FUNC_LOCAL_SIZE, FUNC_STACK_PURGE_SIZE, FUNC_NAME, FUNC_INLINE,
FUNC_NO_RETURN, FUNC_CALLING_CONVENTION)
@param latestMyChanges
@param originalLatestChanges
@param originalMyChanges
@param monitor
@return
@throws CancelledException
Ghidra/Features/Base/src/main/java/ghidra/app/merge/listing/ExternalFunctionMerger.java