def map_indicator_fields(indicator):
    """Map indicator fields for sentinel indicator.

    Args:
        indicator (dict): Data fetched from DataminrPulse
        azure_function_name (str): Azure Function Name

    Returns:
        list: mapped indicators' data
    """
    try:
        mapped_indicators = []
        __method_name = inspect.currentframe().f_code.co_name
        parsed_embedded_data = json.loads(indicator.get("_embedded_labels_s"))
        confidence = ""
        if indicator.get("alertType_id_s", "") == "flash":
            confidence = 100
        elif indicator.get("alertType_id_s", "") == "urgentUpdate":
            confidence = 60
        elif indicator.get("alertType_id_s", "") == "urgent":
            confidence = 60
        elif indicator.get("alertType_id_s", "") == "alert":
            confidence = 30
        parsed_patterns = get_pattern_and_values(parsed_embedded_data)
        for parsed_data in parsed_patterns:
            pattern = ""
            pattern_type = ""
            if parsed_data.get("type") == "URL":
                pattern = "url:value ="
                pattern_type = "URL"
            elif parsed_data.get("type") == "File":
                pattern = "file:hashes.'{}' =".format(
                    hash_types.get(parsed_data.get("hashType", ""), "")
                )
                pattern_type = "File"
            elif parsed_data.get("type") == "IPv4":
                pattern = "ipv4-addr:value ="
                pattern_type = "ipv4-addr"
            elif parsed_data.get("type") == "IPv6":
                pattern = "ipv6-addr:value ="
                pattern_type = "ipv6-addr"
            sentinel_indicator = {
                "kind": "indicator",
                "properties": {
                    "source": "Dataminr: {}".format(indicator.get("Source", "")),
                    "displayName": "Dataminr: {}".format(indicator.get("index_s", "")),
                    "confidence": confidence,
                    "description": indicator.get("headline_s", ""),
                    "threatTypes": [pattern_type],
                    "pattern": "[{} '{}']".format(
                        (pattern), parsed_data.get("value", "")
                    ),
                    "patternType": pattern_type,
                },
            }
            mapped_indicators.append(sentinel_indicator)
        applogger.info(
            "{}(method={}) : {} : Indicator Field Mapping is done for index {}.".format(
                consts.LOGS_STARTS_WITH,
                __method_name,
                consts.DATAMINR_PULSE_THREAT_INTELLIGENCE,
                indicator.get("index_s", ""),
            )
        )
        return mapped_indicators
    except Exception as error:
        applogger.error(
            "{}(method={}) : {} : Error occured :{}.".format(
                consts.LOGS_STARTS_WITH,
                __method_name,
                consts.DATAMINR_PULSE_THREAT_INTELLIGENCE,
                error,
            )
        )
        raise DataminrPulseException(error)
Map indicator fields for sentinel indicator.

    Args:
        indicator (dict): Data fetched from DataminrPulse
        azure_function_name (str): Azure Function Name

    Returns:
        list: mapped indicators' data
    
Solutions/Dataminr Pulse/Data Connectors/DataminrPulseAlerts/DataminrPulseThreatIntelligence/dataminr_pulse_to_threat_intelligence_mapping.py