code: def get_mock_dataset(root_dir):
      """
      root_dir: directory to the mocked dataset
      """
      mocked_samples = []
      mocked_training = []
      mocked_validation = []
      mocked_testing = []
      sample_rate = 22050
  
      seed = 0
      for genre in gtzan.gtzan_genres:
          base_dir = os.path.join(root_dir, "genres", genre)
          os.makedirs(base_dir, exist_ok=True)
          for i in range(100):
              filename = f"{genre}.{i:05d}"
              path = os.path.join(base_dir, f"{filename}.wav")
              data = get_whitenoise(
                  sample_rate=sample_rate,
                  duration=0.01,
                  n_channels=1,
                  dtype="int16",
                  seed=seed,
              )
              save_wav(path, data, sample_rate)
              sample = (normalize_wav(data), sample_rate, genre)
              mocked_samples.append(sample)
              if filename in gtzan.filtered_test:
                  mocked_testing.append(sample)
              if filename in gtzan.filtered_train:
                  mocked_training.append(sample)
              if filename in gtzan.filtered_valid:
                  mocked_validation.append(sample)
              seed += 1
      return (
          mocked_samples,
          mocked_training,
          mocked_validation,
          mocked_testing,
      )
  
file_path: audio/test/torchaudio_unittest/datasets/gtzan_test.py
imports: import os
  from pathlib import Path
  from torchaudio.datasets import gtzan
  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_samples,  mocked_training,  mocked_validation,  mocked_testing