code: def isolated_parso_cache(monkeypatch, tmpdir):
      """Set `parso.cache._default_cache_path` to a temporary directory
      during the test."""
      cache_path = Path(str(tmpdir), "__parso_cache")
      monkeypatch.setattr(cache, "_default_cache_path", cache_path)
      return cache_path
  
imports: import os
  import pytest
  import time
  from pathlib import Path
  from parso.cache import _CACHED_FILE_MAXIMUM_SURVIVAL, _VERSION_TAG, _get_cache_clear_lock_path, _get_hashed_path, _load_from_file_system, _NodeCacheItem, _remove_cache_and_update_lock, _save_to_file_system, load_module, parser_cache, try_to_save_module
  from parso._compatibility import is_pypy
  from parso import load_grammar
  from parso import cache
  from parso import file_io
  from parso import parse
label_desc: Use image node_id 1 for calling a global function with example usage: isolated_parso_cache(monkeypatch, tmpdir) and returns: cache_path