def _reset_state_mode(self, state, mode):
        """
        Reset the state mode to the given mode, and apply the custom state options specified with this analysis.

        :param state:    The state to work with.
        :param str mode: The state mode.
        :return:         None
        """

        state.set_mode(mode)
        state.options |= self._state_add_options
        state.options = state.options.difference(self._state_remove_options)
Reset the state mode to the given mode, and apply the custom state options specified with this analysis.

        :param state:    The state to work with.
        :param str mode: The state mode.
        :return:         None