code: def prepare_data(args):
      config_file = Path(args.config_file).expanduser().resolve()
      audiodirs = [
          Path(audiodir).expanduser().resolve()
          for audiodir in args.audiodirs
      ]
      audios = {
          path.stem: str(path)
          for audiodir in audiodirs
          for path in audiodir.rglob("*.wav")
      }
      suffix = "_" + args.uttid_suffix if args.uttid_suffix else ""
      with DatadirWriter(args.outdir) as writer, config_file.open(
          "r"
      ) as f:
          for line in f:
              line = line.strip()
              if not line:
                  continue
  
              (
                  path_clean,
                  start_time,
                  path_noise,
                  path_rir,
                  snr,
                  scale,
              ) = line.split()
              uttid = "#".join(
                  [
                      Path(path_clean).stem,
                      Path(path_noise).stem,
                      Path(path_rir).stem,
                      start_time,
                      snr,
                      scale,
                  ]
              )
              writer["wav.scp"][uttid + suffix] = audios[uttid]
              if args.use_reverb_ref:
                  repl = r"/reverb_ref/\1"
              else:
                  repl = r"/noreverb_ref/\1"
              writer["spk1.scp"][uttid + suffix] = re.sub(
                  r"/mix/([^\\]+\.wav$)", repl, audios[uttid]
              )
              if "librispeech" in path_clean:
                  spkid = "-".join(path_clean.split("/")[-3:-1])
              else:
                  spkid = path_clean.split("/")[-2]
              writer["utt2spk"][uttid + suffix] = spkid
  
imports: import argparse
  import re
  from pathlib import Path
  from espnet2.fileio.datadir_writer import DatadirWriter
  from espnet2.utils.types import str2bool
label_desc: Use image node_id 1 for calling a global function with example usage: prepare_data(args) without return types