def __setstate__(self, state):
if not isinstance(state, dict):<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>if '<STR_LIT>' not in state and '<STR_LIT>' in state:<EOL><INDENT>state['<STR_LIT>'] = self.dtype.validate_categories(state.pop(<EOL>'<STR_LIT>'))<EOL><DEDENT>if '<STR_LIT>' not in state and '<STR_LIT>' in state:<EOL><INDENT>state['<STR_LIT>'] = coerce_indexer_dtype(<EOL>state.pop('<STR_LIT>'), state['<STR_LIT>'])<EOL><DEDENT>if '<STR_LIT>' not in state:<EOL><INDENT>if '<STR_LIT>' in state:<EOL><INDENT>state['<STR_LIT>'] = state.pop('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>state['<STR_LIT>'] = False<EOL><DEDENT><DEDENT>if '<STR_LIT>' not in state:<EOL><INDENT>state['<STR_LIT>'] = CategoricalDtype(state['<STR_LIT>'],<EOL>state['<STR_LIT>'])<EOL><DEDENT>for k, v in state.items():<EOL><INDENT>setattr(self, k, v)<EOL><DEDENT>
Necessary for making this object picklable