class_docstr: Data class for a workflow task.
class_docstr_tok: ["Data","class","for","a","workflow","task","."]
code: def to_dict(self) -> Dict:
      return {
          "task_id": self.task_id,
          "task_options": self.options.to_dict(),
          "user_metadata": self.user_metadata,
      }
  
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 1 for calling the Task obj's underlying member method code with example usage: obj.to_dict() and returns: dict