code: def test_only_teardown_classic(self, dag_maker):
      @task()
      def mytask():
          print("mytask")
  
      @task()
      def mytask2():
          print("mytask")
  
      with dag_maker("foo") as dag:
          teardowntask = BashOperator(
              task_id="teardowntask", bash_command="echo 1"
          ).as_teardown()
          with teardowntask:
              mytask() >> mytask2()
  
      assert len(dag.task_group.children) == 3
      assert not dag.task_group.children["mytask"].upstream_task_ids
      assert dag.task_group.children["mytask"].downstream_task_ids == {
          "mytask2"
      }
      assert dag.task_group.children["mytask2"].upstream_task_ids == {
          "mytask"
      }
      assert dag.task_group.children["mytask2"].downstream_task_ids == {
          "teardowntask"
      }
      assert dag.task_group.children[
          "teardowntask"
      ].upstream_task_ids == {"mytask2"}
      assert not dag.task_group.children[
          "teardowntask"
      ].downstream_task_ids
  
imports: from __future__ import annotations
  import pytest
  from airflow.decorators import setup, task, task_group, teardown
  from airflow.decorators.setup_teardown import context_wrapper
  from airflow.exceptions import AirflowException
  from airflow.operators.bash import BashOperator
label_desc: Use image node_id 27 for calling the TestSetupTearDownTask obj's underlying member method code with example usage: obj.test_only_teardown_classic(dag_maker) without return types