def add_tags(self, item, *tags):
<EOL>try:<EOL><INDENT>assert item["<STR_LIT:data>"]["<STR_LIT>"]<EOL><DEDENT>except AssertionError:<EOL><INDENT>item["<STR_LIT:data>"]["<STR_LIT>"] = list()<EOL><DEDENT>for tag in tags:<EOL><INDENT>item["<STR_LIT:data>"]["<STR_LIT>"].append({"<STR_LIT>": "<STR_LIT:%s>" % tag})<EOL><DEDENT>assert self.check_items([item])<EOL>return self.update_item(item)<EOL>
Add one or more tags to a retrieved item,
then update it on the server
Accepts a dict, and one or more tags to add to it
Returns the updated item from the server