def create_indicator_data(self, indicator):
        """To create python dictionary for posting indicator into defender."""
        __method_name = inspect.currentframe().f_code.co_name
        sentinel_indicator_display_name = None
        try:
            sentinel_indicator_display_name = indicator.get("properties", {}).get(
                "displayName", None
            )
            indicator_data = {}
            # convert sentinel indicator type to defender indicator type.
            indicator_data[
                "indicatorType"
            ] = self.sentinel_defender_mapping_obj.get_defender_indicator_type(
                indicator
            )

            # Convert confidence integer to action and severity.
            (
                indicator_data["action"],
                indicator_data["severity"],
                cofense_threat_level,
            ) = self.sentinel_defender_mapping_obj.get_defender_action_and_severity(
                indicator
            )

            # get the indicator value from the sentinel indicator data.
            indicator_data[
                "indicatorValue"
            ] = self.sentinel_defender_mapping_obj.get_defender_indicator_value(
                indicator
            )

            indicator_data[
                "title"
            ] = self.sentinel_defender_mapping_obj.get_defender_title(indicator)

            indicator_data[
                "description"
            ] = self.sentinel_defender_mapping_obj.get_defender_description(
                indicator_data.get("severity", ""), cofense_threat_level
            )

            if cofense_threat_level == "Malicious":
                indicator_data["generateAlert"] = "True"

            indicator_data[
                "application"
            ] = self.sentinel_defender_mapping_obj.get_defender_application_value(
                indicator
            )
        except CofenseException as error:
            applogger.error(
                "{}(method={}) : {} : Error occurred while generating MS Defender indicator payload. "
                "Sentinel indicator name : {}. Error : {}.".format(
                    consts.LOGS_STARTS_WITH,
                    __method_name,
                    consts.SENTINEL_TO_DEFENDER,
                    sentinel_indicator_display_name,
                    error,
                )
            )
            self.failed_indicator_count += 1
            self.failed_indicator_list.append(sentinel_indicator_display_name)
        return indicator_data
To create python dictionary for posting indicator into defender.
Solutions/CofenseTriage/Data Connectors/CofenseTriageDataConnector/IndicatorCreatorToDefender/sentinel.py