buildRefTree = async function(allParsedContent, luSearchFn) {
    let refs = {};
    await Promise.all(allParsedContent.LUISContent.map(async (parserObj, objIdx) => {
        let luObj = {
            obj : parserObj.LUISJsonStructure,
            srcFile : parserObj.srcFile,
            refs : []
        };
        if (refs[parserObj.srcFile] === undefined) {
             refs[parserObj.srcFile] = {
                'luis': luObj
            };
        } else {
            if (refs[parsedObj.srcFile].luis === undefined) {
                ref[parserObj.srcFile].luis = luObj;
            }
        }
        parserObj.LUISJsonStructure.uttHash = {};
        (parserObj.LUISJsonStructure.utterances || []).forEach(async (utterance, uttIdx) => {
            parserObj.LUISJsonStructure.uttHash[utterance.text] = '';
            if (helpers.isUtteranceLinkRef(utterance.text)) {
                let parsedLinkUri = await helpers.parseLinkURI(utterance.text, parserObj.srcFile, luSearchFn);
                refs[parserObj.srcFile].luis.refs.push({
                    refId: parsedLinkUri.fileName,
                    uttId: uttIdx,
                    parsedLink: parsedLinkUri,
                    uttObj: utterance,
                    text: utterance.text,
                    type: 'luis'
                })
            }
        })
    }))

    await Promise.all(allParsedContent.QnAContent.map(async (parserObj, objIdx) => {
        let qnaObj = {
            obj : parserObj.qnaJsonStructure,
            alt : allParsedContent.QnAAlterations[objIdx].qnaAlterations,
            srcFile : parserObj.srcFile,
            refs : []
        }
        if (refs[parserObj.srcFile] === undefined) {
            refs[parserObj.srcFile] = {'qna': qnaObj};
        } else {
            if (refs[parserObj.srcFile].qna === undefined) {
                refs[parserObj.srcFile].qna = qnaObj;
            }
        }
        (parserObj.qnaJsonStructure.qnaList.forEach(async qnaPair => {
            qnaPair.questions.forEach(async (question, qIdx) => {
                if (helpers.isUtteranceLinkRef(question)) {
                    let parsedLinkUri = await helpers.parseLinkURI(question)
                    refs[parserObj.srcFile].qna.refs.push({
                        refId: parsedLinkUri.fileName,
                        qId: qIdx,
                        text: question,
                        qObj: qnaPair,
                        parsedLink: parsedLinkUri,
                        type: 'qna'
                    })
                }
            })
        }))
    }));

    return refs;
}
Merges Lu/QnA files into a parserObject.
@param {Array<Lu>} luObjArray Array of LU/QnA files to be merge
@param {boolean} verbose indicates if we need verbose logging.
@param {string} luis_culture LUIS locale code
@param {function} luSearchFn function to retrieve the lu files found in the references
@returns {parserObject} Object that contains list of parsed LUIS object, list of parsed QnA object and list of parsed QnA Alteration Content
@throws {exception} Throws on errors. exception object includes errCode and text.