code: def teardown_appcontext(self, func: Callable) -> Callable:
          
          handler = ensure_coroutine(func)
          self.teardown_appcontext_funcs.append(handler)
          return func
docs: Add a teardown app (context) function.
  
          This is designed to be used as a decorator. An example usage,
  
          .. code-block:: python
  
              @app.teardown_appcontext
              def func():
                  ...
  
          Arguments:
              func: The teardown function itself.
              name: Optional blueprint key name.