<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def initialize(self, version, force=False):
 """ Initialize the manifest document in the given datamodel :param version: Actual version of the datamodel :param force: Replace manifest if it already exists """

        _check_version_format(version)
        if not force and self.collection.find_one({'_id': 'manifest'}):
            raise DatamodelManifestError("Datamodel has already a manifest")
        manifest = self.collection.update({'_id': 'manifest'}, {
            '_id': 'manifest', 'version': version, 'history': [
                {'timestamp': datetime.utcnow(), 'version': version,
                 'reason': 'Initialize version'}
            ]}, upsert=True)
        return manifest