code: def test_dag_edges_setup_teardown_nested():
      from airflow.decorators import task, task_group
      from airflow.models.dag import DAG
      from airflow.operators.empty import EmptyOperator
  
      execution_date = pendulum.parse("20200101")
  
      with DAG(dag_id="s_t_dag", start_date=execution_date) as dag:
  
          @task
          def test_task():
              print("Hello world!")
  
          @task_group
          def inner():
              inner_start = EmptyOperator(task_id="start")
              inner_end = EmptyOperator(task_id="end")
  
              test_task_r = test_task.override(task_id="work")()
              (
                  inner_start
                  >> test_task_r
                  >> inner_end.as_teardown(setups=inner_start)
              )
  
          @task_group
          def outer():
              outer_work = EmptyOperator(task_id="work")
              inner_group = inner()
              inner_group >> outer_work
  
          dag_start = EmptyOperator(task_id="dag_start")
          dag_end = EmptyOperator(task_id="dag_end")
          dag_start >> outer() >> dag_end
  
      edges = dag_edges(dag)
  
      actual = sorted(
          (e["source_id"], e["target_id"], e.get("is_setup_teardown"))
          for e in edges
      )
      assert actual == [
          ("dag_start", "outer.upstream_join_id", None),
          ("outer.downstream_join_id", "dag_end", None),
          ("outer.inner.downstream_join_id", "outer.work", None),
          ("outer.inner.start", "outer.inner.end", True),
          ("outer.inner.start", "outer.inner.work", None),
          ("outer.inner.work", "outer.inner.downstream_join_id", None),
          ("outer.inner.work", "outer.inner.end", None),
          ("outer.upstream_join_id", "outer.inner.start", None),
          ("outer.work", "outer.downstream_join_id", None),
      ]
  
imports: from __future__ import annotations
  from datetime import timedelta
  import pendulum
  import pytest
  from airflow.decorators import dag, setup, task, task_group, teardown
  from airflow.exceptions import TaskAlreadyInTaskGroup
  from airflow.models.baseoperator import BaseOperator
  from airflow.models.dag import DAG
  from airflow.models.xcom_arg import XComArg
  from airflow.operators.bash import BashOperator
  from airflow.operators.empty import EmptyOperator
  from airflow.operators.python import PythonOperator
  from airflow.utils.dag_edges import dag_edges
  from airflow.utils.task_group import TaskGroup, task_group_to_dict
  from tests.models import DEFAULT_DATE
label_desc: Use image node_id 10 for calling a global function with example usage: test_dag_edges_setup_teardown_nested() without return types