<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def upsert(self, _id, dct, attribute="_id"):
 """Update or Insert a new document :param str _id: The document id :param dict dct: The dictionary to set on the document :param str attribute: The attribute to query for to find the object to set this data on :returns: JSON Mongo client response including the "n" key to show number of objects effected """


        mongo_response = yield self.update(_id, dct, upsert=True, attribute=attribute)

        raise Return(mongo_response)