code: def main():
      args = get_args()
  
      if not os.path.exists(args.out_dir):
          os.makedirs(args.out_dir)
  
      wav_list = open(args.audio_list).readlines()
  
      cnt = 1
      session_p = None
      for i, audio in enumerate(wav_list):
          parts = audio.strip().split(".")
          if len(parts) == 2:
              # Assuming distant mic with name like S03_U01.CH1
              session, mic = parts[0].split("_")
              channel = parts[1]
              base_name = session + "_" + mic + "." + channel
          else:
              # Assuming close talk mic with name like S03_P09
              session, mic = audio.strip().split("_")
              base_name = session + "_" + mic
          fs, sig = siw.read(args.audio_dir + "/" + base_name + ".wav")
          tag = np.ones(len(sig))
          if i == 0 or session != session_p:
              with open(args.trans_dir + "/" + session + ".json") as f:
                  conf = json.load(f)
          tag = Get_time(conf, tag, fs)
          cnt = write_noise(
              args.out_dir,
              args.segment_length,
              audio,
              sig,
              tag,
              fs,
              cnt,
          )
          session_p = session
  
file_path: espnet/egs/chime6/asr1/local/extract_noises.py
imports: import argparse
  import json
  import math
  import os
  import sys
  import numpy
  import scipy.io.wavfile
label_desc: Use image node_id 5 for calling a global function with example usage: main() without return types