def migrate_thrift_obj(self, obj):
if not hasattr(obj, "<STR_LIT>"):<EOL><INDENT>return<EOL><DEDENT>obj_key_set = set(obj.__dict__.keys())<EOL>thrift_field_map = {t[<NUM_LIT:2>]: t[<NUM_LIT:4>] for t in obj.thrift_spec if t}<EOL>obj.__dict__.update({f: copy.copy(thrift_field_map[f]) for f in set(thrift_field_map.keys()) - obj_key_set})<EOL>for value in obj.__dict__.values():<EOL><INDENT>self.migrate_thrift_obj(value)<EOL><DEDENT>
Helper function that can be called when serializing/deserializing thrift objects whose definitions
        have changed, we need to make sure we initialize the new attributes to their default value