code: def test_apps(monkeypatch):
      monkeypatch.syspath_prepend(
          os.path.join(os.path.dirname(__file__), "test_apps")
      )
      original_modules = set(sys.modules.keys())
  
      yield
  
      # Remove any imports cached during the test. Otherwise "import app"
      # will work in the next test even though it's no longer on the path.
      for key in sys.modules.keys() - original_modules:
          sys.modules.pop(key)
  
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 7 for calling a global function with example usage: test_apps(monkeypatch) without return types