code: def get_worker_manager(config, cloud=None, verbose=10):
      if cloud is None:
          return None
  
      assert cloud in ["gcloud", "gcspot", "ec2", "ec2spot"]
      logger = logs.get_logger("runner.get_worker_manager")
      logger.setLevel(verbose)
  
      auth = get_auth(config["database"]["authentication"])
      auth_cookie = auth.get_token_file() if auth else None
  
      branch = config["cloud"].get("branch")
  
      logger.info("using branch {}".format(branch))
  
      if cloud in ["gcloud", "gcspot"]:
          cloudconfig = config["cloud"]["gcloud"]
          worker_manager = GCloudWorkerManager(
              auth_cookie=auth_cookie,
              zone=cloudconfig["zone"],
              branch=branch,
              user_startup_script=config["cloud"].get(
                  "user_startup_script"
              ),
          )
  
      if cloud in ["ec2", "ec2spot"]:
          worker_manager = EC2WorkerManager(
              auth_cookie=auth_cookie,
              branch=branch,
              user_startup_script=config["cloud"].get(
                  "user_startup_script"
              ),
          )
      return worker_manager
  
file_path: studio/studio/model.py
imports: import uuid
  from studio.firebase_provider import FirebaseProvider
  from studio.http_provider import HTTPProvider
  from studio.pubsub_queue import PubsubQueue
  from studio.gcloud_worker import GCloudWorkerManager
  from studio.ec2cloud_worker import EC2WorkerManager
  from studio.util.util import parse_verbosity
  from studio.auth import get_auth
  from studio.db_providers import db_provider_setup
  from studio.queues import queues_setup
  from studio.storage.storage_setup import setup_storage, get_storage_db_provider, reset_storage, set_storage_verbose_level
  from studio.util import logs
label_desc: Use image node_id 6 for calling a global function with example usage: get_worker_manager(config, cloud, verbose) and returns: worker_manager, None