code: def test_ArchivesCache():
      # we don't actually need to test archives handling itself
      path1 = "/zuba/duba"
      path2 = "/zuba/duba2"
      # should not be able to create a persistent cache without topdir
      assert_raises(ValueError, ArchivesCache, persistent=True)
      cache = ArchivesCache()  # by default -- non persistent
  
      archive1_path = op.join(path1, fn_archive_obscure_ext)
      archive2_path = op.join(path2, fn_archive_obscure_ext)
      cached_archive1_path = cache[archive1_path].path
      assert_false(
          cache[archive1_path].path == cache[archive2_path].path
      )
      assert_true(cache[archive1_path] is cache[archive1_path])
      cache.clean()
      assert_false(op.exists(cached_archive1_path))
      assert_false(op.exists(cache.path))
  
      # test del
      cache = ArchivesCache()  # by default -- non persistent
      assert_true(op.exists(cache.path))
      cache_path = cache.path
      del cache
      assert_false(op.exists(cache_path))
  
imports: import itertools
  import os
  from unittest.mock import patch
  import pytest
  from datalad import cfg
  from datalad.support import path
  from datalad.support.archive_utils_patool import unixify_path
  from datalad.support.archives import ArchivesCache, ExtractedArchive, compress_files, decompress_file
  from datalad.support.exceptions import MissingExternalDependency
  from datalad.support.external_versions import external_versions
  from datalad.tests.utils_pytest import OBSCURE_FILENAME, SkipTest, assert_false, assert_raises, assert_true, eq_, ok_file_has_content, ok_generator, on_nfs, on_travis, on_windows, skip_if, swallow_outputs, with_tempfile, with_tree
  import mimetypes
label_desc: Use image node_id 9 for calling a global function with example usage: test_ArchivesCache() without return types