def cofense_to_sentinel_threat_level_mapping(
    indicator_threat_level, azure_function_name
):
    """To map threat level with confidence for microsoft sentinel indicator data."""
    __method_name = inspect.currentframe().f_code.co_name
    indicator_threat_level = indicator_threat_level.lower()
    if indicator_threat_level == "benign" or not indicator_threat_level:
        threat_level = THREAT_LEVEL_BENIGN
    elif indicator_threat_level == "suspicious":
        threat_level = THREAT_LEVEL_SUSPICIOUS
    elif indicator_threat_level == "malicious":
        threat_level = THREAT_LEVEL_MALICIOUS
    else:
        applogger.error(
            "{}(method={}) : {} : Unknown threat type.".format(
                LOGS_STARTS_WITH, __method_name, azure_function_name
            )
        )
        raise CofenseException()
    return threat_level
To map threat level with confidence for microsoft sentinel indicator data.
Solutions/CofenseTriage/Data Connectors/CofenseTriageDataConnector/SharedCode/utils.py