<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update(self, version, reason=None):
 """ Modify the datamodel's manifest :param version: New version of the manifest :param reason: Optional reason of the update (i.g. "Update from x.y.z") """

        _check_version_format(version)
        return self.collection.update({'_id': 'manifest'}, {
            '$set': {'version': version},
            '$push': {'history': {
                'timestamp': datetime.utcnow(), 'version': version,
                'reason': reason}}
        })