def from_tasks(
        cls,
        tasks: Dict[int, LLMCompilerTask],
        verbose: bool = False,
    ) -> "TaskFetchingUnit":
        """Create a TaskFetchingUnit from a list of tasks."""
        tasks_done = {task_idx: asyncio.Event() for task_idx in tasks}
        remaining_tasks = set(tasks.keys())
        return cls(
            tasks=tasks,
            tasks_done=tasks_done,
            remaining_tasks=remaining_tasks,
            verbose=verbose,
        )
Create a TaskFetchingUnit from a list of tasks.
llama-index-integrations/agent/llama-index-agent-llm-compiler/llama_index/agent/llm_compiler/task_fetching_unit.py