code: def cleanup():
      from lightning.app.utilities.app_helpers import _LightningAppRef
  
      yield
      _LightningAppRef._app_instance = None
      shutil.rmtree("./storage", ignore_errors=True)
      shutil.rmtree(_storage_root_dir(), ignore_errors=True)
      shutil.rmtree("./.shared", ignore_errors=True)
      if os.path.isfile(_APP_CONFIG_FILENAME):
          os.remove(_APP_CONFIG_FILENAME)
      _set_context(None)
  
file_path: pytorch-lightning/tests/integrations_app/conftest.py
imports: import contextlib
  import os
  import shutil
  import threading
  from subprocess import Popen
  import psutil
  import pytest
  from lightning.app.storage.path import _storage_root_dir
  from lightning.app.utilities.component import _set_context
  from lightning.app.utilities.packaging import cloud_compute
  from lightning.app.utilities.packaging.app_config import _APP_CONFIG_FILENAME
  from lightning.app.utilities.state import AppState
  from integrations_app.public import _PATH_EXAMPLES
label_desc: Use image node_id 3 for calling a global function with example usage: cleanup() without return types