def advance(self, steps=1, mode=None, **kwargs):

        profile_name = self.enable_table[mode]['profile']
        profile = self.enable_table[mode]['settings']
        player_var = profile['player_variable']

        if self.debug:
            self.log.debug("Advancing %s step(s). Mode: %s, Profile: %s, "
                           "Current State: %s", steps, mode, profile_name,
                           self.player[player_var])

        if self.player[player_var] + steps >= len(profile['states']):

            if profile['loop']:
                if self.debug:
                    self.log.debug("Profile '%s' is in its final state "
                                   "based a player variable %s=%s. Profile "
                                   "setting for loop is True, so resetting to "
                                   "the first state.",
                                   self.active_settings['profile'],
                                   player_var, self.player[player_var])

                self.player[profile['player_variable']] = 0

            else:
                if self.debug:
                    self.log.debug("Profile '%s' is in its final state "
                                   "based a player variable %s=%s. Profile "
                                   "setting for loop is False, so state is not "
                                   "advancing.",
                                   self.active_settings['profile'],
                                   player_var, self.player[player_var])
                return
        else:

            if self.debug:
                self.log.debug("Advancing player variable %s %s state(s)",
                               player_var, steps)

            self.player[player_var] += steps
            self.update_current_state_name(mode)

            for group in self.groups:
                group.check_for_complete(mode)
                # TODO should be made to work for lower priority things too?

        if self.active_settings['profile'] == profile_name:

            if self.debug:
                self.log.debug("Profile '%s' just advanced is the active "
                               "profile", profile_name)

            self._update_lights()
Run the server forever.
dataset/ETHPy150Open missionpinball/mpf/mpf/devices/shot.py/Shot.advance--crossover with--dataset/ETHPy150Open cloudera/hue/desktop/core/src/desktop/lib/wsgiserver.py/CherryPyWSGIServer.start