def METHOD_NAME(target):
    """Create snapshot."""
    while True:
        snapshot = yield
        test.log.debug("create image %s", snapshot)
        snapshot_params = params.object_params(snapshot)
        snapshot = qemu_storage.QemuImg(snapshot_params, root_dir, snapshot)
        fail_on((process.CmdError,))(snapshot.create)(snapshot.params)
        snapshots.append(snapshot)
        target.send(snapshot)