code: def clear_app_state_state_variables():
      """Resets global variables in order to prevent interference between tests."""
      yield
      import lightning.app.utilities.state
  
      lightning.app.utilities.state._STATE = None
      lightning.app.utilities.state._LAST_STATE = None
      AppState._MY_AFFILIATION = ()
      if hasattr(cloud_compute, "_CLOUD_COMPUTE_STORE"):
          cloud_compute._CLOUD_COMPUTE_STORE.clear()
  
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 4 for calling a global function with example usage: clear_app_state_state_variables() without return types