def node_health_watcher(event: NodeChangeEvent):
    """
    Notify when a node becomes unhealthy.

    Add useful information regarding the node's health status.
    """
    new_condition = [c for c in event.obj.status.conditions if c.type == "Ready"]
    old_condition = [c for c in event.old_obj.status.conditions if c.type == "Ready"]

    if len(new_condition) != 1 or len(old_condition) != 1:
        logging.warning(f"more than one Ready condition. new={new_condition} old={old_condition}")

    currently_ready = "true" in new_condition[0].status.lower()
    previously_ready = "true" in old_condition[0].status.lower()

    if currently_ready and not previously_ready:
        logging.info(f"node changed back to healthy: old={event.old_obj} new={event.obj}")

    if currently_ready or currently_ready == previously_ready:
        return

    finding = Finding(
        title=f"Unhealthy node {event.obj.metadata.name}",
        source=FindingSource.KUBERNETES_API_SERVER,
        aggregation_key="NodeNotReady",
        severity=FindingSeverity.HIGH,
        subject=KubeObjFindingSubject(event.obj),
    )
    event.add_finding(finding)
    event.add_enrichment(
        [KubernetesDiffBlock([], event.old_obj, event.obj, event.obj.metadata.name, kind=event.obj.kind)]
    )
    node_status_enricher(event)

    Notify when a node becomes unhealthy.

    Add useful information regarding the node's health status.
    
playbooks/robusta_playbooks/node_enrichments.py