docstr: Creates a new configuration for a Lightly Worker run.
  
  See our docs for more information regarding the different configurations:
  https://docs.lightly.ai/docs/all-configuration-options
  
  Args:
      worker_config:
          Lightly Worker configuration.
      lightly_config:
          Lightly configuration.
      selection_config:
          Selection configuration.
  
  Returns:
      The ID of the created config.
  
  Examples:
      >>> client = ApiWorkflowClient(token="MY_AWESOME_TOKEN")
      >>> selection_config = {
      ...     "n_samples": 3,
      ...     "strategies": [
      ...         {
      ...             "input": {"type": "RANDOM", "random_seed": 42},
      ...             "strategy": {"type": "WEIGHTS"},
      ...         }
      ...     ],
      ... }
      >>> config_id = client.create_compute_worker_config(
      ...     selection_config=selection_config,
      ... )
  
  :meta private:  # Skip docstring generation
docstr_tok: ["Creates","a","new","configuration","for","a","Lightly","Worker","run",".","See","our","docs","for","more","information","regarding","the","different","configurations",":","https",":","\/\/docs.lightly.ai\/docs\/all-configuration-options","Args",":","worker_config",":","Lightly","Worker","configuration",".","lightly_config",":","Lightly","configuration",".","selection_config",":","Selection","configuration",".","Returns",":","The","ID","of","the","created","config",".","Examples",":",">",">",">","client","=","ApiWorkflowClient","(","token=","''","MY_AWESOME_TOKEN","''",")",">",">",">","selection_config","=","{","...","``","n_samples","''",":","3",",","...","``","strategies","''",":","[","...","{","...","``","input","''",":","{","``","type","''",":","``","RANDOM","''",",","``","random_seed","''",":","42","}",",","...","``","strategy","''",":","{","``","type","''",":","``","WEIGHTS","''","}",",","...","}","...","]",",","...","}",">",">",">","config_id","=","client.create_compute_worker_config","(","...","selection_config=selection_config",",","...",")",":","meta","private",":","#","Skip","docstring","generation"]
code: def create_compute_worker_config(
      self,
      worker_config: Optional[Dict[str, Any]] = None,
      lightly_config: Optional[Dict[str, Any]] = None,
      selection_config: Optional[
          Union[Dict[str, Any], SelectionConfigV3]
      ] = None,
  ) -> str:
      """Creates a new configuration for a Lightly Worker run.
  
      See our docs for more information regarding the different configurations:
      https://docs.lightly.ai/docs/all-configuration-options
  
      Args:
          worker_config:
              Lightly Worker configuration.
          lightly_config:
              Lightly configuration.
          selection_config:
              Selection configuration.
  
      Returns:
          The ID of the created config.
  
      Examples:
          >>> client = ApiWorkflowClient(token="MY_AWESOME_TOKEN")
          >>> selection_config = {
          ...     "n_samples": 3,
          ...     "strategies": [
          ...         {
          ...             "input": {"type": "RANDOM", "random_seed": 42},
          ...             "strategy": {"type": "WEIGHTS"},
          ...         }
          ...     ],
          ... }
          >>> config_id = client.create_compute_worker_config(
          ...     selection_config=selection_config,
          ... )
  
      :meta private:  # Skip docstring generation
      """
      if isinstance(selection_config, dict):
          selection = selection_config_from_dict(cfg=selection_config)
      else:
          selection = selection_config
  
      if worker_config is not None:
          worker_config_cc = _config_to_camel_case(cfg=worker_config)
          deserialize_worker_config = _get_deserialize(
              api_client=self.api_client,
              klass=DockerWorkerConfigV3Docker,
          )
          docker = deserialize_worker_config(worker_config_cc)
          _validate_config(cfg=worker_config, obj=docker)
      else:
          docker = None
  
      if lightly_config is not None:
          lightly_config_cc = _config_to_camel_case(cfg=lightly_config)
          deserialize_lightly_config = _get_deserialize(
              api_client=self.api_client,
              klass=DockerWorkerConfigV3Lightly,
          )
          lightly = deserialize_lightly_config(lightly_config_cc)
          _validate_config(cfg=lightly_config, obj=lightly)
      else:
          lightly = None
  
      config = DockerWorkerConfigV3(
          worker_type=DockerWorkerType.FULL,
          docker=docker,
          lightly=lightly,
          selection=selection,
      )
      request = DockerWorkerConfigV3CreateRequest(
          config=config, creator=self._creator
      )
      try:
          response = (
              self._compute_worker_api.create_docker_worker_config_v3(
                  request
              )
          )
          return response.id
      except ApiException as e:
          if e.body is None:
              raise e
          eb = json.loads(e.body)
          eb_code = eb.get("code")
          eb_error = eb.get("error")
          if (
              str(e.status)[0] == "4"
              and eb_code is not None
              and eb_error is not None
          ):
              raise ValueError(
                  f"Trying to schedule your job resulted in\n"
                  f">> {eb_code}\n>> {json.dumps(eb_error, indent=4)}\n"
                  f">> Please fix the issue mentioned above and see our docs "
                  f"https://docs.lightly.ai/docs/all-configuration-options for more help."
              ) from e
          else:
              raise e
  
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 5 for calling the _ComputeWorkerMixin obj's underlying member method code with example usage: obj.create_compute_worker_config(worker_config, lightly_config, selection_config) and returns: response