def __setstate__(self, state):
if '<STR_LIT:version>' not in state:<EOL><INDENT>self.__dict__.update(state)<EOL><DEDENT>elif state['<STR_LIT:version>'] == <NUM_LIT:1>:<EOL><INDENT>if "<STR_LIT>" in state:<EOL><INDENT>state.pop("<STR_LIT>")<EOL><DEDENT>knnState = state['<STR_LIT>']<EOL>del state['<STR_LIT>']<EOL>self.__dict__.update(state)<EOL>self._initEphemerals()<EOL>self._knn.__setstate__(knnState)<EOL><DEDENT>else:<EOL><INDENT>raise RuntimeError("<STR_LIT>")<EOL><DEDENT>self.version = KNNClassifierRegion.__VERSION__<EOL>
Set state from serialized state.