def hit(self, mode='default#$%', waterfall_hits=None,
            **kwargs):
        if (not self.machine.game or
                (self.machine.game and not self.machine.game.balls_in_play) or
                self.active_delay_switches):
            return

        if mode == 'default#$%':
            mode = self.active_mode

        profile, state = self.get_mode_state(mode)

        if self.debug:
            self.log.debug("Hit! Mode: %s, Profile: %s, State: %s",
                           mode, profile, state)

        # do this before the events are posted since events could change the
        # profile
        if not self.enable_table[mode]['settings']['block']:
            need_to_waterfall = True
        else:
            need_to_waterfall = False

        # post events
        self.machine.events.post(self.name + '_hit', profile=profile,
                                 state=state)
        self.machine.events.post(self.name + '_' + profile + '_hit',
                                 profile=profile, state=state)
        self.machine.events.post(self.name + '_' + profile + '_' + state +
                                 '_hit', profile=profile, state=state)

        # Need to try because the event postings above could be used to stop
        # the mode, in which case the mode entry won't be in the enable_table
        try:
            advance = self.enable_table[mode]['settings']['advance_on_hit']
        except KeyError:
            advance = False

        if advance:
            if self.debug:
                self.log.debug("Mode '%s' advance_on_hit is True.", mode)
            self.advance(mode=mode)
        elif self.debug:
            self.log.debug('Not advancing profile state since the current '
                           'mode %s has setting advance_on_hit set to '
                           'False or this mode is not in the enable_table',
                           mode)

        for group in [x for x in self.groups]:
            self.log.debug("Notifying shot_group %s of new hit", group)
            group.hit(mode, profile, state)

        if Shot.monitor_enabled:
            for callback in self.machine.monitors['shots']:
                callback(name=self.name, profile=profile, state=state)

        if need_to_waterfall:

            if self.debug:
                self.log.debug('%s block: False. Waterfalling hits', mode)

            if not waterfall_hits:
                waterfall_hits = set()

            self._waterfall_hits(mode, waterfall_hits.add(profile))

        elif self.debug:
            self.log.debug('%s settings has block enabled', mode)
Logs out the user for the given HttpRequest.
dataset/ETHPy150Open missionpinball/mpf/mpf/devices/shot.py/Shot.hit--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.3/django/contrib/admin/sites.py/AdminSite.logout