code: def find_one_and_update(self, filter, update,
                              projection=None, sort=None, upsert=False,
                              return_document=ReturnDocument.BEFORE, **kwargs):
          common.validate_ok_for_update(update)
          kwargs['update'] = update
          return self.__find_and_modify(filter, projection,
                                        sort, upsert, return_document, **kwargs)