code: def test_data_files_with_metadata_that_misses_one_sample(
      files_with_metadata_that_misses_one_sample,
      drop_metadata,
      cache_dir,
  ):
      (
          file,
          file2,
          metadata_file,
      ) = files_with_metadata_that_misses_one_sample
      if not drop_metadata:
          features = Features(
              {"base": None, "additional_feature": Value("string")}
          )
      else:
          features = Features({"base": None})
      autofolder = DummyFolderBasedBuilder(
          data_files=[file, file2, metadata_file],
          drop_metadata=drop_metadata,
          features=features,
          cache_dir=cache_dir,
      )
      gen_kwargs = autofolder._split_generators(
          StreamingDownloadManager()
      )[0].gen_kwargs
      generator = autofolder._generate_examples(**gen_kwargs)
      if not drop_metadata:
          with pytest.raises(ValueError):
              list(generator)
      else:
          assert all(
              example.keys() == {"base"}
              and all(val is not None for val in example.values())
              for _, example in generator
          )
  
imports: import importlib
  import shutil
  import textwrap
  import pytest
  from datasets import ClassLabel, DownloadManager, Features, Value
  from datasets.data_files import DataFilesDict, get_data_patterns
  from datasets.download.streaming_download_manager import StreamingDownloadManager
  from datasets.packaged_modules.folder_based_builder.folder_based_builder import FolderBasedBuilder, FolderBasedBuilderConfig
  from datasets.tasks import TextClassification
label_desc: Use image node_id 20 for calling a global function with example usage: test_data_files_with_metadata_that_misses_one_sample(files_with_metadata_that_misses_one_sample, drop_metadata, cache_dir) without return types