def update_enable_table(self, profile=None, enable=None, mode=None):

        if mode:
            priority = mode.priority
        else:
            priority = 0

        if not profile:
            try:
                profile = self.enable_table[mode]['profile']
            except KeyError:
                profile = self.config['profile']

        if not enable:
            try:
                enable = self.enable_table[mode]['enable']
            except __HOLE__:
                enable = False

        profile_settings = (
            self.machine.shot_profile_manager.profiles[profile].copy())

        profile_settings['player_variable'] = (
            profile_settings['player_variable'].replace('%', self.name))

        this_entry = {'priority': priority,
                      'profile': profile,
                      'enable': enable,
                      'settings': profile_settings,
                      'current_state_name': None
                      }

        if self.debug:
            self.log.debug("Updating the entry table with: %s:%s", mode,
                           this_entry)

        self.enable_table[mode] = this_entry
        self.update_current_state_name(mode)
        self._sort_enable_table()
dataset/ETHPy150Open missionpinball/mpf/mpf/devices/shot.py/Shot.update_enable_table