code: def add_teardown_callback(self, callback: Callable, pass_exception: bool = False) -> None:
          
          assert check_argument_types()
          self._check_closed()
          self._teardown_callbacks.append((callback, pass_exception))
docs: Add a callback to be called when this context closes.
  
          This is intended for cleanup of resources, and the list of callbacks is processed in the
          reverse order in which they were added, so the last added callback will be called first.
  
          The callback may return an awaitable. If it does, the awaitable is awaited on before
          calling any further callbacks.
  
          :param callback: a callable that is called with either no arguments or with the exception
              that ended this context, based on the value of ``pass_exception``
          :param pass_exception: ``True`` to pass the callback the exception that ended this context
              (or ``None`` if the context ended cleanly)