class_docstr: Context manager for setup/teardown tasks.
  
  :meta private:
code: def set_dependency(
      cls,
      receiving_task: AbstractOperator | list[AbstractOperator],
      new_task: AbstractOperator | list[AbstractOperator],
      upstream=True,
  ):
      if isinstance(new_task, (list, tuple)):
          for task in new_task:
              cls._set_dependency(task, receiving_task, upstream)
      else:
          cls._set_dependency(new_task, receiving_task, upstream)
  
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, cast
  from airflow.exceptions import AirflowException
label_desc: Use image node_id 7 for calling the BaseSetupTeardownContext obj's underlying member method code with example usage: obj.set_dependency(cls, receiving_task, new_task, upstream) without return types