code: def test_data_files_with_wrong_metadata_file_name(
      cache_dir, tmp_path, auto_text_file
  ):
      data_dir = tmp_path / "data_dir_with_bad_metadata"
      data_dir.mkdir(parents=True, exist_ok=True)
      shutil.copyfile(auto_text_file, data_dir / "file.txt")
      metadata_filename = data_dir / "bad_metadata.jsonl"  # bad file
      metadata = textwrap.dedent(
          """\
          {"file_name": "file.txt", "additional_feature": "Dummy file"}
          """
      )
      with open(metadata_filename, "w", encoding="utf-8") as f:
          f.write(metadata)
  
      data_files_with_bad_metadata = DataFilesDict.from_patterns(
          get_data_patterns(str(data_dir)), data_dir.as_posix()
      )
      autofolder = DummyFolderBasedBuilder(
          data_files=data_files_with_bad_metadata, cache_dir=cache_dir
      )
      gen_kwargs = autofolder._split_generators(
          StreamingDownloadManager()
      )[0].gen_kwargs
      generator = autofolder._generate_examples(**gen_kwargs)
      assert all(
          "additional_feature" not in example
          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 23 for calling a global function with example usage: test_data_files_with_wrong_metadata_file_name(cache_dir, tmp_path, auto_text_file) without return types