code: def monkeypatch_session() -> Iterator[MonkeyPatch]:
      monkeypatch_session = MonkeyPatch()
      monkeypatch_session.setenv(
          "CACHE_MONGO_DATABASE", "datasets_server_cache_test"
      )
      monkeypatch_session.setenv(
          "QUEUE_MONGO_DATABASE", "datasets_server_queue_test"
      )
      monkeypatch_session.setenv("COMMON_HF_ENDPOINT", CI_HUB_ENDPOINT)
      monkeypatch_session.setenv("COMMON_HF_TOKEN", CI_APP_TOKEN)
      monkeypatch_session.setenv(
          "DISCUSSIONS_BOT_ASSOCIATED_USER_NAME",
          CI_PARQUET_CONVERTER_USER,
      )
      monkeypatch_session.setenv(
          "DISCUSSIONS_BOT_TOKEN", CI_PARQUET_CONVERTER_APP_TOKEN
      )
      yield monkeypatch_session
      monkeypatch_session.undo()
  
file_path: datasets-server/jobs/cache_maintenance/tests/conftest.py
imports: from collections.abc import Iterator
  from libcommon.queue import _clean_queue_database
  from libcommon.resources import CacheMongoResource, QueueMongoResource
  from libcommon.simple_cache import _clean_cache_database
  from pytest import MonkeyPatch, fixture
  from cache_maintenance.config import JobConfig
  from .constants import CI_APP_TOKEN, CI_HUB_ENDPOINT, CI_PARQUET_CONVERTER_APP_TOKEN, CI_PARQUET_CONVERTER_USER
label_desc: Use image node_id 1 for calling a global function with example usage: monkeypatch_session() without return types