def rule(event):
    if all(
        [
            event.deep_get("Category", default="") == "UserManagement",
            event.deep_get("Status", default="") == "Success",
            event.deep_get("Initiatedby", default="") == "UPN",
            "UPN" in event.deep_get("Target", default=""),
            "Password reset" in event.deep_get("ActivityType", default=""),
        ]
    ):
        return True
    return False
