<s> """<STR_LIT>""" <EOL> import json <EOL> from cafe . engine . models . base import AutoMarshallingModel <EOL> class Version ( AutoMarshallingModel ) : <EOL> def __init__ ( self , version ) : <EOL> super ( Version , self ) . __init__ ( ) <EOL> self . v1 = version <EOL> @ classmethod <EOL> def _json_to_obj ( cls , serialized_str ) : <EOL> """<STR_LIT>""" <EOL> result = None <EOL> json_obj = json . loads ( serialized_str ) <EOL> if json_obj is not None : <EOL> result = [ ] <EOL> for _ in json_obj : <EOL> result . append ( cls . _dict_to_obj ( json_obj ) ) <EOL> return result <EOL> @ classmethod <EOL> def _dict_to_obj ( cls , dic ) : <EOL> kwargs = { '<STR_LIT:version>' : dic . get ( '<STR_LIT>' ) } <EOL> return Version ( ** kwargs ) </s>
