<s> from __future__ import print_function , unicode_literals <EOL> import base64 <EOL> class UnableToDeserializeError ( Exception ) : <EOL> def __init__ ( self , * args , ** kargs ) : <EOL> Exception . __init__ ( self , * args , ** kargs ) <EOL> def serialize ( file_content ) : <EOL> """<STR_LIT>""" <EOL> result = base64 . encodestring ( file_content ) <EOL> return result <EOL> def deserialize ( serialized_content ) : <EOL> try : <EOL> deserialized_content = base64 . decodestring ( serialized_content ) <EOL> except Exception as e : <EOL> raise UnableToDeserializeError ( "<STR_LIT>" % serialized_content , e ) <EOL> return deserialized_content </s>
