def METHOD_NAME(rule):
    """Process an alert rule.
    https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/
    """
    assert isinstance(rule.get("alert"), str)
    assert isinstance(rule.get("expr"), str)
    if rule["alert"] == "Watchdog":
        assert "for" not in rule
    else:
        assert "for" in rule
    assert isinstance(rule.get("labels"), dict)
    assert isinstance(rule.get("annotations"), dict)