code: def get_mock_dataset(root_dir: str, num_speaker: int):
      """
      root_dir: directory to the mocked dataset
      """
      mocked_data = []
      seed = 0
      base_dir = os.path.join(
          root_dir,
          f"Libri{num_speaker}Mix",
          "wav8k",
          "min",
          "train-360",
      )
      os.makedirs(base_dir, exist_ok=True)
      for utterance_id in range(10):
          filename = f"{utterance_id}.wav"
          task_outputs = {}
          for task in _TASKS_TO_MIXTURE:
              # create mixture folder. The folder names depends on the task.
              mixture_folder = _TASKS_TO_MIXTURE[task]
              mixture_dir = os.path.join(base_dir, mixture_folder)
              os.makedirs(mixture_dir, exist_ok=True)
              mixture_path = os.path.join(mixture_dir, filename)
              mixture = _save_wav(mixture_path, seed)
              sources = []
              if task == "enh_both":
                  sources = [task_outputs["sep_clean"][1]]
              else:
                  for speaker_id in range(num_speaker):
                      source_dir = os.path.join(
                          base_dir, f"s{speaker_id+1}"
                      )
                      os.makedirs(source_dir, exist_ok=True)
                      source_path = os.path.join(source_dir, filename)
                      if os.path.exists(source_path):
                          sources = task_outputs["sep_clean"][2]
                          break
                      else:
                          source = _save_wav(source_path, seed)
                          sources.append(source)
                          seed += 1
              task_outputs[task] = (_SAMPLE_RATE, mixture, sources)
          mocked_data.append(task_outputs)
  
      return mocked_data
  
file_path: audio/test/torchaudio_unittest/datasets/librimix_test.py
imports: import os
  from parameterized import parameterized
  from torchaudio.datasets import LibriMix
  from torchaudio_unittest.common_utils import get_whitenoise, save_wav, TempDirMixin, TorchaudioTestCase
label_desc: Use image node_id 2 for calling a global function with example usage: get_mock_dataset(root_dir, num_speaker) and returns: mocked_data