code: def leak_detector():
      yield
  
      # make sure we're not leaking a request context since we are
      # testing flask internally in debug mode in a few cases
      leaks = []
      while request_ctx:
          leaks.append(request_ctx._get_current_object())
          request_ctx.pop()
  
      assert leaks == []
  
file_path: flask/tests/conftest.py
imports: import os
  import pkgutil
  import sys
  import pytest
  from _pytest import monkeypatch
  from flask import Flask
  from flask.globals import request_ctx
label_desc: Use image node_id 8 for calling a global function with example usage: leak_detector() without return types