code: def _save_samples(dataset_dir: str, subset: str, seed: int):
      # generate csv file
      data = _gen_csv(dataset_dir, subset, seed)
  
      # iterate through csv file, save wavs to corresponding files
      header = data[0]
      data = data[1:]  # remove header
      path_idx = header.index("path")
  
      samples = []
      for row in data:
          wav = get_whitenoise(
              sample_rate=SAMPLE_RATE,
              duration=0.01,
              n_channels=1,
              seed=seed,
          )
          path = row[path_idx]
          filename = path.split("/")[-1]
          filename = filename.split(".")[0]
          speaker_id, transcription, act, obj, loc = row[2:]
  
          wav_file = os.path.join(
              dataset_dir,
              "wavs",
              "speakers",
              speaker_id,
              f"{filename}.wav",
          )
          save_wav(wav_file, wav, SAMPLE_RATE)
  
          sample = (
              wav,
              SAMPLE_RATE,
              filename,
              speaker_id,
              transcription,
              act,
              obj,
              loc,
          )
          samples.append(sample)
  
          seed += 1
  
      return samples
  
file_path: audio/test/torchaudio_unittest/datasets/fluentcommands_test.py
imports: import csv
  import os
  import random
  import string
  from torchaudio.datasets import fluentcommands
  from torchaudio_unittest.common_utils import get_whitenoise, save_wav, TempDirMixin, TorchaudioTestCase
label_desc: Use image node_id 3 for calling a global function with example usage: _save_samples(dataset_dir, subset, seed) and returns: samples