code: def test_cache_missing(text_dir: Path):
      load_dataset(str(text_dir))
      Cache(
          dataset_name=text_dir.name, version="auto", hash="auto"
      ).download_and_prepare()
      with pytest.raises(ValueError):
          Cache(
              dataset_name="missing", version="auto", hash="auto"
          ).download_and_prepare()
      with pytest.raises(ValueError):
          Cache(
              dataset_name=text_dir.name, hash="missing"
          ).download_and_prepare()
      with pytest.raises(ValueError):
          Cache(
              dataset_name=text_dir.name,
              config_name="missing",
              version="auto",
              hash="auto",
          ).download_and_prepare()
  
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 4 for calling a global function with example usage: test_cache_missing(text_dir) without return types