@classmethod<EOL><INDENT>def _remap_tag_to_tag_id(cls, tag, new_data):<DEDENT>
try:<EOL><INDENT>value = new_data[tag]<EOL><DEDENT>except:<EOL><INDENT>return<EOL><DEDENT>tag_id = tag + '<STR_LIT>'<EOL>try:<EOL><INDENT>new_data[tag_id] = value['<STR_LIT:id>']<EOL><DEDENT>except:<EOL><INDENT>try:<EOL><INDENT>new_data[tag_id] = value.id<EOL><DEDENT>except AttributeError:<EOL><INDENT>new_data[tag_id] = value<EOL><DEDENT><DEDENT>del new_data[tag]<EOL>
Remaps a given changed field from tag to tag_id.