code: def test_data_files_with_with_metadata_in_different_formats(
      cache_dir, tmp_path, audio_file
  ):
      data_dir = tmp_path / "data_dir_with_metadata_in_different_format"
      data_dir.mkdir(parents=True, exist_ok=True)
      shutil.copyfile(audio_file, data_dir / "audio_file.wav")
      audio_metadata_filename_jsonl = data_dir / "metadata.jsonl"
      audio_metadata_jsonl = textwrap.dedent(
          """\
          {"file_name": "audio_file.wav", "text": "Audio transcription"}
          """
      )
      with open(
          audio_metadata_filename_jsonl, "w", encoding="utf-8"
      ) as f:
          f.write(audio_metadata_jsonl)
      audio_metadata_filename_csv = data_dir / "metadata.csv"
      audio_metadata_csv = textwrap.dedent(
          """\
          file_name,text
          audio_file.wav,Audio transcription
          """
      )
      with open(
          audio_metadata_filename_csv, "w", encoding="utf-8"
      ) as f:
          f.write(audio_metadata_csv)
  
      data_files_with_bad_metadata = DataFilesDict.from_patterns(
          get_data_patterns(str(data_dir)), data_dir.as_posix()
      )
      audiofolder = AudioFolder(
          data_files=data_files_with_bad_metadata, cache_dir=cache_dir
      )
      with pytest.raises(ValueError) as exc_info:
          audiofolder.download_and_prepare()
      assert "metadata files with different extensions" in str(
          exc_info.value
      )
  
imports: import shutil
  import textwrap
  import librosa
  import numpy
  import pytest
  import soundfile
  from datasets import Audio, ClassLabel, Features, Value
  from datasets.data_files import DataFilesDict, get_data_patterns
  from datasets.download.streaming_download_manager import StreamingDownloadManager
  from datasets.packaged_modules.audiofolder.audiofolder import AudioFolder
  from ..utils import require_sndfile
label_desc: Use image node_id 20 for calling a global function with example usage: test_data_files_with_with_metadata_in_different_formats(cache_dir, tmp_path, audio_file) without return types