Unable to configure Event Handler in checkmk RAW 2.2

CMK version: RAW 2.2.0p3
OS version: Rocky linux 8

Error message: Found old style tuple ruleset ((‘1 ‘, [’@all ‘], [’’])). Checkmk now expects dict rules . Please convert to new format , see werk 7352.

I was trying to enable and define event handlers in same way as I did in versions 1.6 but checkmk returns the above error.

This is how I wrote the .mk file:

extra_service_conf["event_handler_enabled"]=[("1", ALL_HOSTS, ALL_SERVICES)]
extra_service_conf["event_handler"] = [
        ("restartspooler", ["srv-printer"],["Service Spooler"]),
        ("restartspooler", ["srv-printer"],["Printer Impresion"])
]

extra_nagios_conf += r"""

define command {
       command_name    restartspooler
       command_line    /opt/omd/sites/<site>/local/share/check_mk/alert_handlers/eventh_restartspooler $SERVICESTATE$ $SERVICESTATETYPE$
}


"""

Please, Can anyone show me how to do it in version 2.2?