code: def prepare_data(
      data_original,
      save_json_train,
      save_json_valid,
      save_json_test,
      split_ratio=[80, 10, 10],
      different_speakers=False,
      test_spk_id=1,
      seed=12,
  ):
      """
      Prepares the json files for the IEMOCAP dataset.
  
      Arguments
      ---------
      data_original : str
          Path to the folder where the original IEMOCAP dataset is stored.
      save_json_train : str
          Path where the train data specification file will be saved.
      save_json_valid : str
          Path where the validation data specification file will be saved.
      save_json_test : str
          Path where the test data specification file will be saved.
      split_ratio: list
          List composed of three integers that sets split ratios for train,
          valid, and test sets, respecively.
          For instance split_ratio=[80, 10, 10] will assign 80% of the sentences
          to training, 10% for validation, and 10% for test.
      test_spk_id: int
          Id of speaker used for test set, 10 speakers in total.
          Here a leave-two-speaker strategy is used for the split,
          if one test_spk_id is selected for test, the other spk_id in the same
          session is automatically used for validation.
          To perform a 10-fold cross-validation,
          10 experiments with test_spk_id from 1 to 10 should be done.
      seed : int
          Seed for reproducibility
  
      Example
      -------
      >>> data_original = '/path/to/iemocap/IEMOCAP_full_release'
      >>> prepare_data(data_original, 'train.json', 'valid.json', 'test.json')
      """
      data_original = data_original + "/Session"
      # setting seeds for reproducible code.
      random.seed(seed)
  
      # Check if this phase is already done (if so, skip it)
      if skip(save_json_train, save_json_valid, save_json_test):
          logger.info(
              "Preparation completed in previous run, skipping."
          )
          return
  
      speaker_dict = transform_data(data_original)
  
      if (
          sum([len(value) for value in speaker_dict.values()])
          != NUMBER_UTT
      ):
          raise ValueError(
              "Error: Number of utterances is not 5531, please check your IEMOCAP folder"
          )
  
      # List files and create manifest from list
      logger.info(
          f"Creating {save_json_train}, {save_json_valid}, and {save_json_test}"
      )
  
      if different_speakers:
          data_split = split_different_speakers(
              speaker_dict, test_spk_id
          )
      else:
          data_split = split_sets(speaker_dict, split_ratio)
  
      # Creating json files
      create_json(data_split["train"], save_json_train)
      create_json(data_split["valid"], save_json_valid)
      create_json(data_split["test"], save_json_test)
  
file_path: speechbrain/recipes/IEMOCAP/quantization/iemocap_prepare.py
imports: import os
  import re
  import json
  import random
  import logging
  from speechbrain.dataio.dataio import read_audio
label_desc: Use image node_id 1 for calling a global function with example usage: prepare_data(data_original, save_json_train, save_json_valid, save_json_test, split_ratio, different_speakers, test_spk_id, seed) without return types