def GetImageUri(self, args, client, holder, instance_refs):
    if (args.IsSpecified('image') or args.IsSpecified('image_family') or args.IsSpecified('image_project')):
        image_expander = image_utils.ImageExpander(client, holder.resources)
        (image_uri, _) = image_expander.ExpandImageFlag(user_project=instance_refs[0].project, image=args.image, image_family=args.image_family, image_project=args.image_project)
        if (holder.resources.Parse(image_uri).project != 'cos-cloud'):
            log.warning('This container deployment mechanism requires a Container-Optimized OS image in order to work. Select an image from a cos-cloud project (cost-stable, cos-beta, cos-dev image families).')
    else:
        image_uri = containers_utils.ExpandKonletCosImageFlag(client)
    return image_uri
def GetImageUri(self, args, client, holder, instance_refs):
    if (args.IsSpecified('image') or args.IsSpecified('image_family') or args.IsSpecified('image_project')):
        image_expander = image_utils.ImageExpander(client, holder.resources)
        (image_uri, _) = image_expander.ExpandImageFlag(user_project=instance_refs[0].project, image=args.image, image_family=args.image_family, image_project=args.image_project)
        if (holder.resources.Parse(image_uri).project != 'cos-cloud'):
            log.warning('This container deployment mechanism requires a Container-Optimized OS image in order to work. Select an image from a cos-cloud project (cost-stable, cos-beta, cos-dev image families).')
    else:
        image_uri = containers_utils.ExpandKonletCosImageFlag(client)
    return image_uri