class_docstr: Context manager for setup/teardown tasks.
  
  :meta private:
code: def update_context_map(cls, task: DependencyMixin):
      from airflow.models.abstractoperator import AbstractOperator
  
      task_ = cast(AbstractOperator, task)
      if task_.is_setup or task_.is_teardown:
          return
      ctx = cls.context_map
  
      def _append_or_set_item(item):
          if ctx.get(item) is None:
              ctx[item] = [task_]
          else:
              ctx[item].append(task_)
  
      if setup_task := cls._context_managed_setup_task:
          if isinstance(setup_task, list):
              _append_or_set_item(tuple(setup_task))
          else:
              _append_or_set_item(setup_task)
      if teardown_task := cls._context_managed_teardown_task:
          if isinstance(teardown_task, list):
              _append_or_set_item(tuple(teardown_task))
          else:
              _append_or_set_item(teardown_task)
  
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, cast
  from airflow.exceptions import AirflowException
label_desc: Use image node_id 9 for calling the BaseSetupTeardownContext obj's underlying member method code with example usage: obj.update_context_map(cls, task) without return types