def prometheus_alert(event: ExecutionBaseEvent, prometheus_event_data: PrometheusAlertParams):
    """
    Simulate Prometheus alert sent to the Robusta runner.
    Can be used for testing, when implementing actions triggered by Prometheus alerts.

    See the full parameters if you need to simulate an alert on a Pod or Node.
    """
    labels = {
        "severity": prometheus_event_data.severity,
        "namespace": prometheus_event_data.namespace,
        "alertname": prometheus_event_data.alert_name,
    }
    if prometheus_event_data.pod_name is not None:
        labels["pod"] = prometheus_event_data.pod_name
    if prometheus_event_data.node_name is not None:
        labels["node"] = prometheus_event_data.node_name
    if prometheus_event_data.deployment_name is not None:
        labels["deployment"] = prometheus_event_data.deployment_name
    if prometheus_event_data.container_name is not None:
        labels["container"] = prometheus_event_data.container_name
    if prometheus_event_data.service is not None:
        labels["service"] = prometheus_event_data.service
    if prometheus_event_data.job_name is not None:
        labels["job_name"] = prometheus_event_data.job_name
    if prometheus_event_data.name is not None:
        labels["name"] = prometheus_event_data.name
    if prometheus_event_data.hpa is not None:
        labels["horizontalpodautoscaler"] = prometheus_event_data.hpa
    if prometheus_event_data.statefulset_name is not None:
        labels["statefulset"] = prometheus_event_data.statefulset_name
    if prometheus_event_data.daemonset_name is not None:
        labels["daemonset"] = prometheus_event_data.daemonset_name
    if prometheus_event_data.labels is not None:
        labels.update(parse_by_operator(prometheus_event_data.labels, [":", "="]))

    starts_at = prometheus_event_data.starts_at if prometheus_event_data.starts_at else datetime.now().astimezone()

    if prometheus_event_data.ends_at is not None:
        ends_at = prometheus_event_data.ends_at
    elif prometheus_event_data.status == "resolved":
        ends_at = datetime.now()
    else:
        # alert not resolved and ends_at not specified
        ends_at = datetime.fromtimestamp(0)

    annotations = {
        "description": prometheus_event_data.description,
        "summary": prometheus_event_data.summary if prometheus_event_data.summary else prometheus_event_data.alert_name,
        "runbook_url": prometheus_event_data.runbook_url,
    }

    if prometheus_event_data.annotations is not None:
        annotations.update(parse_by_operator(prometheus_event_data.annotations, [":", "="]))

    fingerprint = prometheus_event_data.fingerprint
    if not fingerprint:  # if user didn't provide fingerprint, generate random one, to avoid runner deduplication
        fingerprint = "".join(random.choices(string.ascii_lowercase, k=8))

    prometheus_event = AlertManagerEvent(
        **{
            "status": prometheus_event_data.status,
            "description": prometheus_event_data.description,
            "externalURL": "",
            "groupKey": "{}/{}:{}",
            "version": "1",
            "receiver": "robusta receiver",
            "alerts": [
                {
                    "status": prometheus_event_data.status,
                    "endsAt": ends_at,
                    "startsAt": starts_at,
                    "generatorURL": prometheus_event_data.generator_url,
                    "fingerprint": fingerprint,
                    "labels": labels,
                    "annotations": annotations,
                }
            ],
        }
    )
    headers = {"Content-type": "application/json"}
    return requests.post(
        f"http://localhost:{PORT}/api/alerts",
        data=prometheus_event.json(),
        headers=headers,
    )

    Simulate Prometheus alert sent to the Robusta runner.
    Can be used for testing, when implementing actions triggered by Prometheus alerts.

    See the full parameters if you need to simulate an alert on a Pod or Node.
    
playbooks/robusta_playbooks/prometheus_simulation.py