def __getstate__(self):
state = self.__dict__.copy()<EOL>state['<STR_LIT>'] = self._knn.__getstate__()<EOL>del state['<STR_LIT>']<EOL>for field in self._getEphemeralAttributes():<EOL><INDENT>del state[field]<EOL><DEDENT>return state<EOL>
Get serializable state.