def rule(event):
    if all(
        [
            any(
                [
                    "New-InboxRule" in event.deep_get("ScriptBlockText", default=""),
                    "Set-InboxRule" in event.deep_get("ScriptBlockText", default=""),
                ]
            ),
            any(
                [
                    "DeleteMessage" in event.deep_get("ScriptBlockText", default=""),
                    "MarkAsRead" in event.deep_get("ScriptBlockText", default=""),
                    "MoveToFolder" in event.deep_get("ScriptBlockText", default=""),
                    "SubjectOrBodyContainsWords" in event.deep_get("ScriptBlockText", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
