def stop(self, callback=None, **kwargs):
        """Stops this mode.

        Args:
            **kwargs: Catch-all since this mode might start from events with
                who-knows-what keyword arguments.

        Warning: You can safely call this method, but do not override it in your
        mode code. If you want to write your own mode code by subclassing Mode,
        put whatever code you want to run when this mode stops in the
        mode_stop method which will be called automatically.
        """

        self.log.debug('Mode Stop.')

        self.priority = 0
        self.active = False

        for item in self.stop_methods:
            try:
                item[0](item[1])
            except __HOLE__:
                pass

        self.stop_methods = list()

        self.delete_slides_from_mode()
dataset/ETHPy150Open missionpinball/mpf/mpf/media_controller/core/mode.py/Mode.stop