def __getstate__(self):
d = self.__dict__.copy()<EOL>if '<STR_LIT>' in d.keys():<EOL><INDENT>d['<STR_LIT>'] = d['<STR_LIT>'].name<EOL><DEDENT>return d<EOL>
Used for pickle and deepcopy: we have to replace the logger by something that CAN be pickled