@staticmethod<EOL><INDENT>def upsert_single(db, collection, object, match_params=None):<DEDENT>
return str(db[collection].update_one(match_params, {"<STR_LIT>": object}, upsert=True).upserted_id)<EOL>
Wrapper for pymongo.update_one()
:param db: db connection
:param collection: collection to update
:param object: the modifications to apply
:param match_params: a query that matches the documents to update
:return: id of updated document