code: def prepare_cvss(
      src_data_folder,
      tgt_data_folder,
      save_folder,
      splits=["train", "valid", "test"],
      seed=1234,
      skip_prep=False,
  ):
      """
      Prepares the csv files for the CVSS datasets.
  
      Arguments
      ---------
      src_data_folder : str
          Path to the folder where the original source CV data is stored.
      tgt_data_folder : str
          Path to the folder where the original target CVSS data is stored.
      save_folder : str
          The directory where to store the csv files.
      splits : list
          List of splits to prepare.
      skip_prep: Bool
          If True, skip preparation.
      seed : int
          Random seed
      """
      # setting seeds for reproducible code.
      random.seed(seed)
  
      if skip_prep:
          return
  
      # Create configuration for easily skipping data_preparation stage
      conf = {
          "src_data_folder": src_data_folder,
          "tgt_data_folder": tgt_data_folder,
          "splits": splits,
          "save_folder": save_folder,
          "seed": seed,
      }
  
      if not os.path.exists(save_folder):
          os.makedirs(save_folder)
  
      src_validated = pl.Path(src_data_folder) / SRC_METADATA
      tgt_train = pl.Path(tgt_data_folder) / TGT_METADATA["train"]
      tgt_valid = pl.Path(tgt_data_folder) / TGT_METADATA["valid"]
      tgt_test = pl.Path(tgt_data_folder) / TGT_METADATA["test"]
  
      src_audio = pl.Path(src_data_folder) / SRC_AUDIO
      tgt_audio_train = pl.Path(tgt_data_folder) / TGT_AUDIO["train"]
      tgt_audio_valid = pl.Path(tgt_data_folder) / TGT_AUDIO["valid"]
      tgt_audio_test = pl.Path(tgt_data_folder) / TGT_AUDIO["test"]
  
      save_opt = pl.Path(save_folder) / OPT_FILE
      save_json_train = pl.Path(save_folder) / "train.json"
      save_json_valid = pl.Path(save_folder) / "valid.json"
      save_json_valid_small = pl.Path(save_folder) / "valid_small.json"
      save_json_test = pl.Path(save_folder) / "test.json"
  
      # Check if this phase is already done (if so, skip it)
      if skip(splits, save_folder, conf):
          logger.info(
              "Skipping preparation, completed in previous run."
          )
          return
  
      msg = "\tCreating json file for CVSS Dataset.."
      logger.info(msg)
  
      # Prepare csv
      if "train" in splits:
          prepare_json(
              save_json_train,
              src_audio,
              tgt_audio_train,
              src_validated,
              tgt_train,
          )
      if "valid" in splits:
          prepare_json(
              save_json_valid,
              src_audio,
              tgt_audio_valid,
              src_validated,
              tgt_valid,
          )
          prepare_json(
              save_json_valid_small,
              src_audio,
              tgt_audio_valid,
              src_validated,
              tgt_valid,
              limit_to_n_sample=SMALL_EVAL_SIZE,
          )
      if "test" in splits:
          prepare_json(
              save_json_test,
              src_audio,
              tgt_audio_test,
              src_validated,
              tgt_test,
          )
  
      save_pkl(conf, save_opt)
  
file_path: speechbrain/recipes/CVSS/S2ST/cvss_prepare.py
imports: import os
  import csv
  import json
  import logging
  import random
  import tqdm
  import pathlib
  import torchaudio
  from speechbrain.dataio.dataio import load_pkl, save_pkl
label_desc: Use image node_id 1 for calling a global function with example usage: prepare_cvss(src_data_folder, tgt_data_folder, save_folder, splits, seed, skip_prep) without return types