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()
  
imports: import contextlib
  import os
  import shutil
  import signal
  import threading
  from datetime import datetime
  from pathlib import Path
  from threading import Thread
  import psutil
  import py
  import pytest
  from lightning.app.core import constants
  from lightning.app.utilities.app_helpers import _collect_child_process_pids
  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
label_desc: Use image node_id 4 for calling a global function with example usage: clear_app_state_state_variables() without return types