def update_document(self):
        doc = self.reference.get_document()
        if doc.collection.primary_key in self.objects[0]:
            del self.objects[0][doc.collection.primary_key]
        for k, v in self.objects[0].items():
            doc[k] = v
        ret = doc.save(conflict='replace', durability=self.durability, return_changes=self.return_changes)
        return ret
dataset/ETHPy150Open JeffHeard/sondra/sondra/api.py/APIRequest.update_document/original