def rule(event):
    if any(
        [
            all(
                [
                    "logoimagehandler.ashx" in event.deep_get("cs-uri-query", default=""),
                    "clazz" in event.deep_get("cs-uri-query", default=""),
                ]
            ),
            all(
                [
                    "logoimagehandler.ashx" in event.deep_get("cs-uri-query", default=""),
                    event.deep_get("sc-status", default="") == 500,
                ]
            ),
        ]
    ):
        return True
    return False
