def pod_status_silencer(event: PodEvent, params: StatusSilencerParams):
    """
    Stop execution based on pod statuses.
    """
    pod = event.get_pod()
    if not pod:
        logging.info("Cannot run pod_status_silencer with no pod. skipping")
        return

    if params.include:  # Stop unless pod status in include list
        if pod.status.phase not in params.include:
            event.stop_processing = True
            return

    if params.exclude:
        if pod.status.phase in params.exclude:
            event.stop_processing = True

    Stop execution based on pod statuses.
    
playbooks/robusta_playbooks/alerts_integration.py