def prepare_alerts(self, alert_data):
        """Prepare alerts data for ingesting in Sentinel.

        Args:
            alert_data (json): Alert data received via Dataminr RTAP.

        Raises:
            DataminrPulseException: raises when any error occurs.

        Returns:
            alert_data(json): returns prepared alert data
        """
        __method_name = inspect.currentframe().f_code.co_name
        try:
            self.prepare_rawtoredirecturl(alert_data)
            embeded = alert_data.get("_embedded")
            if embeded:
                embeded_labels = embeded.get("labels")
                if embeded_labels:
                    updated_embeded_labels = self.prepare_embeded_labels_data(
                        alert_data.get("index"),
                        embeded_labels,
                        vulnerabilities_products_table,
                    )
                    alert_data.update({"_embedded": {"labels": updated_embeded_labels}})
            if alert_data.get("relatedAlerts"):
                related_alerts = self.post_related_alerts(
                    alert_data.get("relatedAlerts"), alert_data.get("index")
                )
                alert_data.update({"relatedAlerts": related_alerts})
        except DataminrPulseException as err:
            raise DataminrPulseException(err)
        except Exception as error:
            applogger.error(
                "{}".format(
                    self.error_logs.format(self.logs_starts_with, __method_name, error)
                )
            )
            raise DataminrPulseException(error)
Prepare alerts data for ingesting in Sentinel.

        Args:
            alert_data (json): Alert data received via Dataminr RTAP.

        Raises:
            DataminrPulseException: raises when any error occurs.

        Returns:
            alert_data(json): returns prepared alert data
        
Solutions/Dataminr Pulse/Data Connectors/DataminrPulseAlerts/DataminrPulseAlertsSentinelActivity/dataminr_pulse.py