code: def test_app_tearing_down_with_handled_exception_by_except_block(app):
      cleanup_stuff = []
  
      @app.teardown_appcontext
      def cleanup(exception):
          cleanup_stuff.append(exception)
  
      with app.app_context():
          try:
              raise Exception("dummy")
          except Exception:
              pass
  
      assert cleanup_stuff == [None]
  
file_path: flask/tests/test_appctx.py
imports: import pytest
  import flask
  from flask.globals import app_ctx
  from flask.globals import request_ctx
label_desc: Use image node_id 8 for calling a global function with example usage: test_app_tearing_down_with_handled_exception_by_except_block(app) without return types