docstr: Creates a new worker for clearml.
  
  First, create an instance in the cloud and install some required packages.
  Then, define clearml-agent environment variables and run clearml-agent for the specified queue.
  NOTE: - Will wait until instance is running
        - This implementation assumes the instance image already has docker installed
  
  :param dict resource: resource configuration, as defined in BUDGET and QUEUES.
  :param str worker_prefix: worker name without instance_id
  :param str queue_name: clearml queue to listen to
  :param str task_id: Task ID to restart
docstr_tok: ["Creates","a","new","worker","for","clearml",".","First",",","create","an","instance","in","the","cloud","and","install","some","required","packages",".","Then",",","define","clearml-agent","environment","variables","and","run","clearml-agent","for","the","specified","queue",".","NOTE",":","-","Will","wait","until","instance","is","running","-","This","implementation","assumes","the","instance","image","already","has","docker","installed",":","param","dict","resource",":","resource","configuration",",","as","defined","in","BUDGET","and","QUEUES",".",":","param","str","worker_prefix",":","worker","name","without","instance_id",":","param","str","queue_name",":","clearml","queue","to","listen","to",":","param","str","task_id",":","Task","ID","to","restart"]
code: def spin_up_worker(
      self, resource, worker_prefix, queue_name, task_id
  ):
      """Creates a new worker for clearml.
  
      First, create an instance in the cloud and install some required packages.
      Then, define clearml-agent environment variables and run clearml-agent for the specified queue.
      NOTE: - Will wait until instance is running
            - This implementation assumes the instance image already has docker installed
  
      :param dict resource: resource configuration, as defined in BUDGET and QUEUES.
      :param str worker_prefix: worker name without instance_id
      :param str queue_name: clearml queue to listen to
      :param str task_id: Task ID to restart
      """
  
imports: import logging
  from abc import ABC, abstractmethod
  from os import environ
  import attr
  from ..backend_api import Session
  from ..backend_api.session.defs import ENV_AUTH_TOKEN
label_desc: Use image node_id 2 for calling the CloudDriver obj's underlying member method code with example usage: obj.spin_up_worker(resource, worker_prefix, queue_name, task_id) without return types