def rule(event):
    if any(
        [
            all(
                [
                    event.deep_get("EventID", default="") == 4898,
                    any(
                        [
                            "1.3.6.1.5.5.7.3.2" in event.deep_get("TemplateContent", default=""),
                            "1.3.6.1.5.2.3.4" in event.deep_get("TemplateContent", default=""),
                            "1.3.6.1.4.1.311.20.2.2"
                            in event.deep_get("TemplateContent", default=""),
                            "2.5.29.37.0" in event.deep_get("TemplateContent", default=""),
                        ]
                    ),
                    "CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT"
                    in event.deep_get("TemplateContent", default=""),
                ]
            ),
            all(
                [
                    event.deep_get("EventID", default="") == 4899,
                    any(
                        [
                            "1.3.6.1.5.5.7.3.2" in event.deep_get("NewTemplateContent", default=""),
                            "1.3.6.1.5.2.3.4" in event.deep_get("NewTemplateContent", default=""),
                            "1.3.6.1.4.1.311.20.2.2"
                            in event.deep_get("NewTemplateContent", default=""),
                            "2.5.29.37.0" in event.deep_get("NewTemplateContent", default=""),
                        ]
                    ),
                    "CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT"
                    in event.deep_get("NewTemplateContent", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
