parseAndHandleImportSection = async function (parsedContent, luResource) {
    // handle reference
    let luImports = luResource.Sections.filter(s => s.SectionType === SectionType.IMPORTSECTION);
    if (luImports && luImports.length > 0) {
        for (const luImport of luImports) {
            let linkValueText = luImport.Description.replace('[', '').replace(']', '');
            let linkValue = luImport.Path.replace('(', '').replace(')', '');
            let parseUrl = url.parse(linkValue);
            if (parseUrl.host || parseUrl.hostname) {
                let options = { method: 'HEAD' };
                let response;
                try {
                    response = await fetch(linkValue, options);
                } catch (err) {
                    // throw, invalid URI
                    let errorMsg = `URI: "${linkValue}" appears to be invalid. Please double check the URI or re-try this parse when you are connected to the internet.`;
                    let error = BuildDiagnostic({
                        message: errorMsg,
                        range: luImport.Range
                    })

                    throw (new exception(retCode.errorCode.INVALID_URI, error.toString(), [error]));
                }

                if (!response.ok) {
                    let errorMsg = `URI: "${linkValue}" appears to be invalid. Please double check the URI or re-try this parse when you are connected to the internet.`;
                    let error = BuildDiagnostic({
                        message: errorMsg,
                        range: luImport.Range
                    })

                    throw (new exception(retCode.errorCode.INVALID_URI, error.toString(), [error]));
                }

                let contentType = response.headers.get('content-type');
                if (!contentType.includes('text/html')) {
                    if (parseUrl.pathname.toLowerCase().endsWith('.lu') || parseUrl.pathname.toLowerCase().endsWith('.qna')) {
                        parsedContent.additionalFilesToParse.push(new fileToParse(linkValue));
                    } else {
                        parsedContent.qnaJsonStructure.files.push(new qnaFile(linkValue, linkValueText));
                    }
                } else {
                    parsedContent.qnaJsonStructure.urls.push(linkValue);
                }

            } else {
                parsedContent.additionalFilesToParse.push(new fileToParse(linkValue));
            }
        }
    }
}
Reference parser code to parse reference section.
@param {parserObj} Object with that contains list of additional files to parse, parsed LUIS object and parsed QnA object
@param {LUResouce} luResource resources extracted from lu file content
@throws {exception} Throws on errors. exception object includes errCode and text.