code: def __process_data(
      data_folder: str, dst_folder: str, manifest_file: str
  ):
      """
      Converts flac to wav and build manifests's json
      Args:
          data_folder: source with flac files
          dst_folder: where wav files will be stored
          manifest_file: where to store manifest
      Returns:
      """
      if not os.path.exists(dst_folder):
          os.makedirs(dst_folder)
  
      real_rir_list = os.path.join(
          data_folder,
          "RIRS_NOISES",
          "real_rirs_isotropic_noises",
          "rir_list",
      )
      rirfiles = []
      with open(real_rir_list, "r") as rir_f:
          for line in rir_f:
              rirfiles.append(
                  os.path.join(data_folder, line.rstrip().split(" ")[4])
              )
  
      real_rir_folder = os.path.join(dst_folder, "real_rirs")
      if not os.path.exists(real_rir_folder):
          os.makedirs(real_rir_folder)
      # split multi-channel rir files to single channel
      for rir_f in rirfiles:
          n_chans = int(
              subprocess.check_output(
                  "soxi -c {0}".format(rir_f), shell=True
              )
          )
          if n_chans == 1:
              copy(rir_f, real_rir_folder)
          else:
              for chan in range(1, n_chans + 1):
                  chan_file_name = os.path.join(
                      real_rir_folder,
                      os.path.splitext(os.path.basename(rir_f))[0]
                      + "-"
                      + str(chan)
                      + ".wav",
                  )
                  _ = subprocess.check_output(
                      f"sox {rir_f} {chan_file_name} remix {chan}",
                      shell=True,
                  )
  
      # move simulated rirs to processed
      if not os.path.exists(os.path.join(dst_folder, "simulated_rirs")):
          move(
              os.path.join(
                  data_folder, "RIRS_NOISES", "simulated_rirs"
              ),
              dst_folder,
          )
  
      os.chdir(dst_folder)
      all_rirs = glob.glob("**/*.wav", recursive=True)
      with open(manifest_file, "w") as man_f:
          entry = {}
          for rir in all_rirs:
              rir_file = os.path.join(dst_folder, rir)
              duration = subprocess.check_output(
                  "soxi -D {0}".format(rir_file), shell=True
              )
              entry["audio_filepath"] = rir_file
              entry["duration"] = float(duration)
              entry["offset"] = 0
              entry["text"] = "_"
              man_f.write(json.dumps(entry) + "\n")
  
      print("Done!")
  
file_path: NeMo/scripts/dataset_processing/get_openslr_rir_data.py
imports: import argparse
  import glob
  import json
  import logging
  import os
  import subprocess
  import urllib.request
  from shutil import copy, move
  from zipfile import ZipFile
  from tqdm import tqdm
label_desc: Use image node_id 4 for calling a global function with example usage: __process_data(data_folder, dst_folder, manifest_file) without return types