def __set_state(self, state):
        "Sets state of instance while validating incoming state."
        for key, (klass, value) in state.items():
            if klass is Namespace:
                self.__set_namespace(key, value)
            elif klass is Parameter:
                self.__set_parameter(key, value)
Sets state of instance while validating incoming state.
recipes/Python/578173_Settings_Organizer/recipe-578173.py