def selection_config_from_dict(cfg: Dict[str, Any]) -> SelectionConfigV4:
    """Recursively converts selection config from dict to a SelectionConfigV4 instance."""
    new_cfg = copy.deepcopy(cfg)
    strategies = []
    for entry in new_cfg.get("strategies", []):
        strategies.append(selection_config_entry_from_dict(entry=entry))
    new_cfg["strategies"] = strategies
    auto_tasks = []
    for entry in new_cfg.get("auto_tasks", []):
        auto_tasks.append(auto_task_from_dict(entry=entry))
    new_cfg["auto_tasks"] = auto_tasks
    return SelectionConfigV4(**new_cfg)
Recursively converts selection config from dict to a SelectionConfigV4 instance.
lightly/api/api_workflow_compute_worker.py