code: def env(request):
      """Fixture for a full testing environment"""
      td = mkdtemp()
      env = {
          "TESTDIR": td,
          "IPYTHONDIR": pjoin(td, "ipython"),
          "JUPYTER_CONFIG_DIR": pjoin(td, "jupyter"),
          "JUPYTER_DATA_DIR": pjoin(td, "jupyter_data"),
          "JUPYTER_RUNTIME_DIR": pjoin(td, "jupyter_runtime"),
          "JUPYTER_PATH": "",
      }
      env_patch = patch.dict(os.environ, env)
      env_patch.start()
  
      yield env
  
      env_patch.stop()
      shutil.rmtree(td, ignore_errors=os.name == "nt")
  
imports: from __future__ import annotations
  import os
  import re
  import shutil
  from tempfile import mkdtemp
  from unittest.mock import patch
  import pytest
  from jupyter_core import migrate
  from jupyter_core.application import JupyterApp
  from jupyter_core.migrate import migrate, migrate_config, migrate_dir, migrate_file, migrate_one, migrate_static_custom
  from jupyter_core.utils import ensure_dir_exists
label_desc: Use image node_id 2 for calling a global function with example usage: env(request) without return types