code: def dataio_prep(hparams):
      """This function prepares the datasets to be used in the brain class.
      It also defines the data processing pipeline through user-defined functions.
      We expect `prepare_common_language` to have been called before this,
      so that the `train.csv`, `dev.csv`,  and `test.csv` manifest files
      are available.
  
      Arguments
      ---------
      hparams : dict
          This dictionary is loaded from the `train.yaml` file, and it includes
          all the hyperparameters needed for dataset construction and loading.
  
      Returns
      -------
      datasets : dict
          Contains two keys, "train" and "dev" that correspond
          to the appropriate DynamicItemDataset object.
      """
  
      # Initialization of the label encoder. The label encoder assignes to each
      # of the observed label a unique index (e.g, 'lang01': 0, 'lang02': 1, ..)
      language_encoder = sb.dataio.encoder.CategoricalEncoder()
  
      # Define audio pipeline
      @sb.utils.data_pipeline.takes("wav")
      @sb.utils.data_pipeline.provides("sig")
      def audio_pipeline(wav):
          """Load the signal, and pass it and its length to the corruption class.
          This is done on the CPU in the `collate_fn`."""
          sig, _ = torchaudio.load(wav)
          sig = sig.transpose(0, 1).squeeze(1)
  
          return sig
  
      # Define label pipeline:
      @sb.utils.data_pipeline.takes("language")
      @sb.utils.data_pipeline.provides("language", "language_encoded")
      def label_pipeline(language):
          yield language
          language_encoded = language_encoder.encode_label_torch(
              language
          )
          yield language_encoded
  
      # Define datasets. We also connect the dataset with the data processing
      # functions defined above.
      datasets = {}
      for dataset in ["train", "dev", "test"]:
          datasets[
              dataset
          ] = sb.dataio.dataset.DynamicItemDataset.from_csv(
              csv_path=hparams[f"{dataset}_csv"],
              replacements={"data_root": hparams["data_folder"]},
              dynamic_items=[audio_pipeline, label_pipeline],
              output_keys=["id", "sig", "language_encoded"],
          )
  
      # Load or compute the label encoder (with multi-GPU DDP support)
      # Please, take a look into the lab_enc_file to see the label to index
      # mappinng.
      language_encoder_file = os.path.join(
          hparams["save_folder"], "language_encoder.txt"
      )
      language_encoder.load_or_create(
          path=language_encoder_file,
          from_didatasets=[datasets["train"]],
          output_key="language",
      )
  
      return datasets, language_encoder
  
file_path: speechbrain/recipes/CommonLanguage/lang_id/train.py
imports: import os
  import sys
  import logging
  import torchaudio
  import speechbrain
  from hyperpyyaml import load_hyperpyyaml
  from common_language_prepare import prepare_common_language
label_desc: Use image node_id 1 for calling a global function with example usage: dataio_prep(hparams) and returns: datasets,  language_encoder, sig