code: def dataio_prep(hparams, json_file):
      """Creates the datasets and their data processing pipelines.
      This is used for multi-mic processing.
      """
  
      # 1. Datasets
      data_folder = hparams["data_folder"]
      dataset = sb.dataio.dataset.DynamicItemDataset.from_json(
          json_path=json_file,
          replacements={"data_root": data_folder},
      )
  
      # 2. Define audio pipeline.
      if params["mic_type"] == "Array1":
          # Multi-mic (Microphone Array)
          @sb.utils.data_pipeline.takes("wav")
          @sb.utils.data_pipeline.provides("sig")
          def audio_pipeline(wav):
              mics_signals = read_audio_multichannel(wav).unsqueeze(0)
              sig = params["multimic_beamformer"](mics_signals)
              sig = sig.squeeze()
              return sig
  
      else:
          # Single microphone
          @sb.utils.data_pipeline.takes("wav")
          @sb.utils.data_pipeline.provides("sig")
          def audio_pipeline(wav):
              sig = read_audio(wav)
              return sig
  
      sb.dataio.dataset.add_dynamic_item([dataset], audio_pipeline)
  
      # 3. Set output:
      sb.dataio.dataset.set_output_keys([dataset], ["id", "sig"])
  
      # 4. Create dataloader:
      dataloader = sb.dataio.dataloader.make_dataloader(
          dataset, **params["dataloader_opts"]
      )
  
      return dataloader
  
imports: import os
  import sys
  import torch
  import logging
  import pickle
  import json
  import glob
  import shutil
  import numpy
  import speechbrain
  from tqdm.contrib import tqdm
  from hyperpyyaml import load_hyperpyyaml
  from speechbrain.utils.distributed import run_on_main
  from speechbrain.processing.PLDA_LDA import StatObject_SB
  from speechbrain.processing import diarization
  from speechbrain.utils.DER import DER
  from speechbrain.dataio.dataio import read_audio
  from speechbrain.dataio.dataio import read_audio_multichannel
label_desc: Use image node_id 9 for calling a global function with example usage: dataio_prep(hparams, json_file) and returns: dataloader, sig, sig