code: def create_manifest(
      input_manifest, noise_manifest, snrs, out_path, save_noise
  ):
      os.makedirs(os.path.join(out_path, "manifests"), exist_ok=True)
      for snr in snrs:
          out_dir = get_out_dir_name(
              out_path,
              os.path.splitext(os.path.basename(input_manifest))[0],
              os.path.splitext(os.path.basename(noise_manifest))[0],
              snr,
          )
          out_mfst = os.path.join(
              os.path.join(out_path, "manifests"),
              os.path.splitext(os.path.basename(input_manifest))[0]
              + "_"
              + os.path.splitext(os.path.basename(noise_manifest))[0]
              + "_"
              + str(snr)
              + "db"
              + ".json",
          )
          with open(input_manifest, "r") as inf, open(
              out_mfst, "w"
          ) as outf:
              for line in inf:
                  row = json.loads(line.strip())
                  row["audio_filepath"] = os.path.join(
                      out_dir, os.path.basename(row["audio_filepath"])
                  )
                  if save_noise:
                      file_ext = os.path.splitext(
                          row["audio_filepath"]
                      )[1]
                      noise_filename = os.path.basename(
                          row["audio_filepath"]
                      ).replace(file_ext, "_noise" + file_ext)
                      row["noise_filepath"] = os.path.join(
                          out_dir, noise_filename
                      )
                  outf.write(json.dumps(row) + "\n")
  
file_path: NeMo/scripts/dataset_processing/add_noise.py
imports: import argparse
  import copy
  import json
  import multiprocessing
  import os
  import random
  import numpy
  import soundfile
  from nemo.collections.asr.parts.preprocessing.perturb import NoisePerturbation
  from nemo.collections.asr.parts.preprocessing.segment import AudioSegment
label_desc: Use image node_id 2 for calling a global function with example usage: create_manifest(input_manifest, noise_manifest, snrs, out_path, save_noise) without return types