def __getstate__(self):
state = super(GenericImage,self).__getstate__()<EOL>if '<STR_LIT>' in state and state['<STR_LIT>'] is not None:<EOL><INDENT>f = BytesIO()<EOL>image = state['<STR_LIT>']<EOL>image.save(f,format=image.format or '<STR_LIT>')<EOL>state['<STR_LIT>'] = f.getvalue()<EOL>f.close()<EOL><DEDENT>return state<EOL>
Return the object's state (as in the superclass), but replace
the '_image' attribute's Image with a string representation.