code: def data_prep(data_folder):
      "Creates the datasets and their data processing pipelines."
  
      # 1. Declarations:
      train_data = sb.dataio.dataset.DynamicItemDataset.from_json(
          json_path=data_folder / "../annotation/ASR_train.json",
          replacements={"data_root": data_folder},
      )
      valid_data = sb.dataio.dataset.DynamicItemDataset.from_json(
          json_path=data_folder / "../annotation/ASR_dev.json",
          replacements={"data_root": data_folder},
      )
      datasets = [train_data, valid_data]
  
      # 2. Define audio pipeline:
      @sb.utils.data_pipeline.takes("wav")
      @sb.utils.data_pipeline.provides("sig")
      def audio_pipeline(wav):
          sig = sb.dataio.dataio.read_audio(wav)
          return sig
  
      sb.dataio.dataset.add_dynamic_item(datasets, audio_pipeline)
  
      # 3. Set output:
      sb.dataio.dataset.set_output_keys(datasets, ["id", "sig"])
  
      return train_data, valid_data
  
file_path: speechbrain/tests/integration/autoencoder/example_auto_experiment.py
imports: import pathlib
  import speechbrain
  from hyperpyyaml import load_hyperpyyaml
label_desc: Use image node_id 1 for calling a global function with example usage: data_prep(data_folder) and returns: train_data,  valid_data, sig