handlePrebuiltEntity = function(parsedContent, entityName, entityType, entityRoles, locale, log, range) {
    locale = locale ? locale.toLowerCase() : 'en-us';
    // check if this pre-built entity is already labelled in an utterance and or added as a simple entity. if so, throw an error.
    try {
        let rolesImport = VerifyAndUpdateSimpleEntityCollection(parsedContent, entityType, entityName);
        if (rolesImport.length !== 0) {
            rolesImport.forEach(role => !entityRoles.includes(role) ? entityRoles.push(role) : undefined);
        }
    } catch (err) {
        throw (err);
    }
    // verify if the requested entityType is available in the requested locale
    if (!builtInTypes.consolidatedList.includes(entityType)) {
        let errorMsg = `Unknown PREBUILT entity '${entityType}'. Available pre-built types are ${builtInTypes.consolidatedList.join(',')}`;
        let error = BuildDiagnostic({
            message: errorMsg,
            range: range
        })

        throw (new exception(retCode.errorCode.INVALID_INPUT, error.toString(), [error]));
    }
    let prebuiltCheck = builtInTypes.perLocaleAvailability[locale][entityType];
    if (prebuiltCheck === null) {
        if (log) {
            process.stdout.write(chalk.default.yellowBright('[WARN]: Requested PREBUILT entity "' + entityType + ' is not available for the requested locale: ' + locale + '\n'));
            process.stdout.write(chalk.default.yellowBright('  Skipping this prebuilt entity..\n'));
        } else {
            let errorMsg = `PREBUILT entity '${entityType}' is not available for the requested locale '${locale}'`;
            let error = BuildDiagnostic({
                message: errorMsg,
                range: range
            })

            throw (new exception(retCode.errorCode.INVALID_INPUT, error.toString(), [error]));
        }
    } else if (prebuiltCheck && prebuiltCheck.includes('datetime')) {
        if (log) {
            process.stdout.write(chalk.default.yellowBright('[WARN]: PREBUILT entity "' + entityType + ' is not available for the requested locale: ' + locale + '\n'));
            process.stdout.write(chalk.default.yellowBright('  Switching to ' + builtInTypes.perLocaleAvailability[locale][entityType] + ' instead.\n'));
        }
        entityType = builtInTypes.perLocaleAvailability[locale][entityType];
        addItemOrRoleIfNotPresent(parsedContent.LUISJsonStructure, LUISObjNameEnum.PREBUILT, entityType, entityRoles);
    } else {
        // add to prebuiltEntities if it does not exist there.
        addItemOrRoleIfNotPresent(parsedContent.LUISJsonStructure, LUISObjNameEnum.PREBUILT, entityType, entityRoles);
    }
}
@param {Object} parsedContent parsed LUIS, QnA and QnA alternations
@param {String} entityName entity name
@param {String} entityType entity type
@param {String []} entityRoles list of entity roles
@param {String} locale current locale
@param {Boolean} log boolean to indicate if errors should be sent to stdout
@param {String} range range