def METHOD_NAME(tag, keys):
    global idle_checker
    class IdleChecker(QtCore.QObject):  # type:ignore
        def __init__(self):
            QtCore.QObject.__init__(self)
            self._tid = self.startTimer(5000)
        def stop(self):
            self.killTimer(self._tid)
        def timerEvent(self, ev):
            t = time.time()
            for i, cx in enumerate(g.app.commanders()):
                t1 = cx.user_dict.get('last_command_at', t)
                t2 = cx.user_dict.get('last_snap_at', 0)
                if t - t1 > 5 and t1 > t2:
                    cx.user_dict['last_snap_at'] = t
                    if save_snapshot(cx):
                        g.es('snap', i, cx.mFileName.rpartition('/')[2])
    print("don't forget to launch leo-ver-serv!!!")
    idle_checker = IdleChecker()