self.collection.update_one({'function': doc['function']},
                                           {'$set': doc}, upsert=True, collation=self.collation)