code: def test_cache_last_used_update(diff_cache, use_file_io):
      p = "/path/last-used"
      parser_cache.clear()  # Clear, because then it's easier to find stuff.
      parse("somecode", cache=True, path=p)
      node_cache_item = next(iter(parser_cache.values()))[p]
      now = time.time()
      assert node_cache_item.last_used < now
  
      if use_file_io:
          f = _FixedTimeFileIO(
              p, "code", node_cache_item.last_used - 10
          )
          parse(file_io=f, cache=True, diff_cache=diff_cache)
      else:
          parse("somecode2", cache=True, path=p, diff_cache=diff_cache)
  
      node_cache_item = next(iter(parser_cache.values()))[p]
      assert now < node_cache_item.last_used < time.time()
  
imports: import os
  import os.path
  import pytest
  import time
  from parso.cache import _CACHED_FILE_MAXIMUM_SURVIVAL, _VERSION_TAG, _get_cache_clear_lock, _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, PermissionError
  from parso import load_grammar
  from parso import cache
  from parso import file_io
  from parso import parse
label_desc: Use image node_id 6 for calling a global function with example usage: test_cache_last_used_update(diff_cache, use_file_io) without return types