code: def get_mock_dataset(root_dir):
      """
      root_dir: path to the mocked dataset
      """
      mocked_data = []
      base_dir = os.path.join(root_dir, "LJSpeech-1.1")
      archive_dir = os.path.join(base_dir, "wavs")
      os.makedirs(archive_dir, exist_ok=True)
      metadata_path = os.path.join(base_dir, "metadata.csv")
      sample_rate = 22050
  
      with open(metadata_path, mode="w", newline="") as metadata_file:
          metadata_writer = csv.writer(
              metadata_file, delimiter="|", quoting=csv.QUOTE_NONE
          )
          for i, (transcript, normalized_transcript) in enumerate(
              zip(_TRANSCRIPTS, _NORMALIZED_TRANSCRIPT)
          ):
              fileid = f"LJ001-{i:04d}"
              metadata_writer.writerow(
                  [fileid, transcript, normalized_transcript]
              )
              filename = fileid + ".wav"
              path = os.path.join(archive_dir, filename)
              data = get_whitenoise(
                  sample_rate=sample_rate,
                  duration=1,
                  n_channels=1,
                  dtype="int16",
                  seed=i,
              )
              save_wav(path, data, sample_rate)
              mocked_data.append(normalize_wav(data))
      return mocked_data, _TRANSCRIPTS, _NORMALIZED_TRANSCRIPT
  
file_path: audio/test/torchaudio_unittest/datasets/ljspeech_test.py
imports: import csv
  import os
  from pathlib import Path
  from torchaudio.datasets import ljspeech
  from torchaudio_unittest.common_utils import get_whitenoise, normalize_wav, save_wav, TempDirMixin, TorchaudioTestCase
label_desc: Use image node_id 1 for calling a global function with example usage: get_mock_dataset(root_dir) and returns: mocked_data,  _TRANSCRIPTS,  _NORMALIZED_TRANSCRIPT