code: def test_cache_multi_configs():
      repo_id = SAMPLE_DATASET_TWO_CONFIG_IN_METADATA
      dataset_name = repo_id.split("/")[-1]
      config_name = "v1"
      ds = load_dataset(repo_id, config_name)
      cache = Cache(
          dataset_name=dataset_name,
          repo_id=repo_id,
          config_name=config_name,
          version="auto",
          hash="auto",
      )
      reloaded = cache.as_dataset()
      assert list(ds) == list(reloaded)
      assert len(ds["train"]) == len(reloaded["train"])
      with pytest.raises(ValueError) as excinfo:
          Cache(
              dataset_name=dataset_name,
              repo_id=repo_id,
              config_name="missing",
              version="auto",
              hash="auto",
          )
      assert config_name in str(excinfo.value)
  
file_path: datasets/tests/packaged_modules/test_cache.py
imports: from pathlib import Path
  import pytest
  from datasets import load_dataset
  from datasets.packaged_modules.cache.cache import Cache
label_desc: Use image node_id 5 for calling a global function with example usage: test_cache_multi_configs() without return types