def cloudman_launch(vm_launcher, options):
    cloudman_options = options.get('cloudman')
    image_id = cloudman_options.get('image_id', None)
    if str(image_id).lower() == "__use_snaps__":
        # TODO: Make more flexible
        bucket_source = cloudman_options.get("bucket_source")
        snaps_path = join(bucket_source, "snaps.yaml")
        if not exists(snaps_path):
            raise Exception(snaps_path % "CloudMan AMI set to __use_snaps__ but now snaps.yaml file could be found with path %s")
        snaps = {}
        with open(snaps_path, "r") as in_handle:
            snaps = yaml.load(in_handle)
        clouds = snaps["clouds"]
        if len(clouds) != 1:
            raise Exception("Exactly one cloud must be defined snaps.yaml for the deployer's CloudMan launch to work.")
        regions = clouds[0]["regions"]
        if len(regions) != 1:
            raise Exception("Exactly one region must be defined snaps.yaml for the deployer's CloudMan launch to work.")
        deployments = regions[0]["deployments"]
        if len(deployments) != 1:
            raise Exception("Exactly one deployment must be defined snaps.yaml for the deployer's CloudMan launch to work.")
        image_id = deployments[0]["default_mi"]

    size_id = cloudman_options.get('size_id', None)
    user_data = _prepare_user_data(vm_launcher, cloudman_options)
    vm_launcher.create_node('cloudman',
                            image_id=image_id,
                            size_id=size_id,
                            ex_userdata=user_data)
dataset/ETHPy150Open chapmanb/cloudbiolinux/cloudbio/deploy/plugins/cloudman.py/cloudman_launch/swapped operands of `%`