code: def test_task_group_arrow_with_setup_group_deeper_setup():
      """
      When recursing upstream for a non-teardown leaf, we should ignore setups that
      are direct upstream of a teardown.
      """
      with DAG(
          dag_id="setup_group_teardown_group_2",
          start_date=pendulum.now(),
      ):
          with TaskGroup("group_1") as g1:
  
              @setup
              def setup_1():
                  ...
  
              @setup
              def setup_2():
                  ...
  
              @teardown
              def teardown_0():
                  ...
  
              s1 = setup_1()
              s2 = setup_2()
              t0 = teardown_0()
              s2 >> t0
  
          with TaskGroup("group_2") as g2:
  
              @teardown
              def teardown_1():
                  ...
  
              @teardown
              def teardown_2():
                  ...
  
              t1 = teardown_1()
              t2 = teardown_2()
  
          @task_decorator
          def work():
              ...
  
          w1 = work()
          g1 >> w1 >> g2
          t1.as_teardown(setups=s1)
          t2.as_teardown(setups=s2)
      assert set(s1.operator.downstream_task_ids) == {
          "work",
          "group_2.teardown_1",
      }
      assert set(s2.operator.downstream_task_ids) == {
          "group_1.teardown_0",
          "group_2.teardown_2",
      }
      assert set(w1.operator.downstream_task_ids) == {
          "group_2.teardown_1",
          "group_2.teardown_2",
      }
      assert set(t1.operator.downstream_task_ids) == set()
      assert set(t2.operator.downstream_task_ids) == set()
  
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 38 for calling a global function with example usage: test_task_group_arrow_with_setup_group_deeper_setup() without return types