docstr: Registers a new Lightly Worker.
  
  The ID of the registered worker will be returned. If a worker with the same
  name already exists, the ID of the existing worker is returned.
  
  Args:
      name:
          The name of the Lightly Worker.
      labels:
          The labels of the Lightly Worker.
          See our docs for more information regarding the labels parameter:
          https://docs.lightly.ai/docs/assign-scheduled-runs-to-specific-workers
  
  Returns:
      ID of the registered Lightly Worker.
  
  Examples:
      >>> client = ApiWorkflowClient(token="MY_AWESOME_TOKEN")
      >>> worker_id = client.register_compute_worker(name="my-worker", labels=["worker-label"])
      >>> worker_id
      '64709eac61e9ce68180a6529'
docstr_tok: ["Registers","a","new","Lightly","Worker",".","The","ID","of","the","registered","worker","will","be","returned",".","If","a","worker","with","the","same","name","already","exists",",","the","ID","of","the","existing","worker","is","returned",".","Args",":","name",":","The","name","of","the","Lightly","Worker",".","labels",":","The","labels","of","the","Lightly","Worker",".","See","our","docs","for","more","information","regarding","the","labels","parameter",":","https",":","\/\/docs.lightly.ai\/docs\/assign-scheduled-runs-to-specific-workers","Returns",":","ID","of","the","registered","Lightly","Worker",".","Examples",":",">",">",">","client","=","ApiWorkflowClient","(","token=","''","MY_AWESOME_TOKEN","''",")",">",">",">","worker_id","=","client.register_compute_worker","(","name=","''","my-worker","''",",","labels=","[","``","worker-label","''","]",")",">",">",">","worker_id","'64709eac61e9ce68180a6529","'"]
code: def register_compute_worker(
      self, name: str = "Default", labels: Optional[List[str]] = None
  ) -> str:
      """Registers a new Lightly Worker.
  
      The ID of the registered worker will be returned. If a worker with the same
      name already exists, the ID of the existing worker is returned.
  
      Args:
          name:
              The name of the Lightly Worker.
          labels:
              The labels of the Lightly Worker.
              See our docs for more information regarding the labels parameter:
              https://docs.lightly.ai/docs/assign-scheduled-runs-to-specific-workers
  
      Returns:
          ID of the registered Lightly Worker.
  
      Examples:
          >>> client = ApiWorkflowClient(token="MY_AWESOME_TOKEN")
          >>> worker_id = client.register_compute_worker(name="my-worker", labels=["worker-label"])
          >>> worker_id
          '64709eac61e9ce68180a6529'
      """
      if labels is None:
          labels = []
      request = CreateDockerWorkerRegistryEntryRequest(
          name=name,
          worker_type=DockerWorkerType.FULL,
          labels=labels,
          creator=self._creator,
      )
      response = self._compute_worker_api.register_docker_worker(
          request
      )
      return response.id
  
imports: import copy
  import dataclasses
  import difflib
  import json
  import time
  from functools import partial
  from typing import Any, Callable, Dict, Iterator, List, Optional, Type, TypeVar, Union
  from lightly.api import utils
  from lightly.openapi_generated.swagger_client.api_client import ApiClient
  from lightly.openapi_generated.swagger_client.models import CreateDockerWorkerRegistryEntryRequest, DockerRunData, DockerRunScheduledCreateRequest, DockerRunScheduledData, DockerRunScheduledPriority, DockerRunScheduledState, DockerRunState, DockerWorkerConfigV3, DockerWorkerConfigV3CreateRequest, DockerWorkerConfigV3Docker, DockerWorkerConfigV3Lightly, DockerWorkerRegistryEntryData, DockerWorkerType, SelectionConfigV3, SelectionConfigV3Entry, SelectionConfigV3EntryInput, SelectionConfigV3EntryStrategy, TagData
  from lightly.openapi_generated.swagger_client.rest import ApiException
label_desc: Use image node_id 1 for calling the _ComputeWorkerMixin obj's underlying member method code with example usage: obj.register_compute_worker(name, labels) and returns: response