class_docstr: The execution state of a workflow. This dataclass helps with observation
  and debugging.
class_docstr_tok: ["The","execution","state","of","a","workflow",".","This","dataclass","helps","with","observation","and","debugging","."]
docstr: Initialize the context of all tasks.
docstr_tok: ["Initialize","the","context","of","all","tasks","."]
code: def init_context(self, context: WorkflowTaskContext) -> None:
      """Initialize the context of all tasks."""
      for task_id, task in self.tasks.items():
          options = task.options
          self.task_context.setdefault(
              task_id,
              dataclasses.replace(
                  context,
                  task_id=task_id,
                  creator_task_id=context.task_id,
                  checkpoint=options.checkpoint,
                  catch_exceptions=options.catch_exceptions,
              ),
          )
  
imports: import asyncio
  from collections import deque, defaultdict
  import dataclasses
  from dataclasses import field
  import logging
  from typing import List, Dict, Optional, Set, Deque, Callable
  import ray
  from ray.workflow.common import TaskID, WorkflowRef, WorkflowTaskRuntimeOptions
  from ray.workflow.workflow_context import WorkflowTaskContext
label_desc: Use image node_id 10 for calling the WorkflowExecutionState obj's underlying member method code with example usage: obj.init_context(context) without return types