code: def _draw_task(
      task: MappedOperator | BaseOperator,
      parent_graph: graphviz.Digraph,
      states_by_task_id: dict[Any, Any] | None,
  ) -> None:
      """Draw a single task on the given parent_graph."""
      if states_by_task_id:
          state = states_by_task_id.get(task.task_id)
          color = State.color_fg(state)
          fill_color = State.color(state)
      else:
          color = task.ui_fgcolor
          fill_color = task.ui_color
  
      parent_graph.node(
          task.task_id,
          _attributes={
              "label": task.label,
              "shape": "rectangle",
              "style": "filled,rounded",
              "color": _refine_color(color),
              "fillcolor": _refine_color(fill_color),
          },
      )
  
file_path: airflow/airflow/utils/dot_renderer.py
imports: from __future__ import annotations
  import warnings
  from typing import TYPE_CHECKING, Any
  from airflow.exceptions import AirflowException
  from airflow.models.baseoperator import BaseOperator
  from airflow.models.mappedoperator import MappedOperator
  from airflow.utils.dag_edges import dag_edges
  from airflow.utils.state import State
  from airflow.utils.task_group import TaskGroup
label_desc: Use image node_id 2 for calling a global function with example usage: _draw_task(task, parent_graph, states_by_task_id) without return types