def __setstate__(self, state):
for key, val in state.items():<EOL><INDENT>descriptor = self.__class__.__dict__.get(key)<EOL>if not isinstance(descriptor, ReadOnlyAttribute):<EOL><INDENT>continue<EOL><DEDENT>descriptor.__set__(self, val, do_check=False)<EOL><DEDENT>for key, val in state.items():<EOL><INDENT>descriptor = self.__class__.__dict__.get(key)<EOL>if not isinstance(descriptor, ReadOnlyAttribute):<EOL><INDENT>continue<EOL><DEDENT>descriptor.check_wrapper(self, val)<EOL><DEDENT>
Part of the pickle protocol