def rule(event):
    if all(
        [
            event.deep_get("Category", default="") == "Policy",
            event.deep_get("ActivityDisplayName", default="") == "Set device registration policies",
        ]
    ):
        return True
    return False
