class_docstr: Context manager for setup/teardown tasks.
  
  :meta private:
code: def pop_setup_upstream_of_teardown(
      cls,
  ) -> AbstractOperator | list[AbstractOperator]:
      old_setup_task = cls._setup_upstream_of_teardown
      if cls._previous_setup_upstream_of_teardown:
          cls._setup_upstream_of_teardown = (
              cls._previous_setup_upstream_of_teardown.pop()
          )
          setup_task = cls._setup_upstream_of_teardown
          if setup_task and old_setup_task:
              cls.set_dependency(
                  old_setup_task, setup_task, upstream=False
              )
      else:
          cls._setup_upstream_of_teardown = []
      return old_setup_task
  
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, cast
  from airflow.exceptions import AirflowException
label_desc: Use image node_id 6 for calling the BaseSetupTeardownContext obj's underlying member method code with example usage: obj.pop_setup_upstream_of_teardown(cls) and returns: old_setup_task