code: def apply_musan(audio, musan_dir):
      # Get a random noise
      files = glob.glob(os.path.join(musan_dir, "noise/*/*.wav"))
      noise = librosa.load(random.choice(files), sr=SAMPLERATE)[0]
  
      # Calculate signal/noise power
      signal_power = np.mean(np.square(audio))
      noise_power = np.mean(np.square(noise))
  
      # Convert SNR(db) into scaling factor (adjust loudness according to SNR)
      snr = random.uniform(-9, 9)
      snr_ratio = np.power(10, -snr / 10)
      multiplier = np.sqrt(snr_ratio * signal_power / noise_power)
  
      # Repeat the noise up to the input audio length
      noise = librosa.util.fix_length(
          noise, size=len(audio), mode="wrap"
      )
      return audio + multiplier * noise
  
file_path: espnet/egs2/reazonspeech/asr1/local/augment.py
imports: import getopt
  import glob
  import io
  import os
  import random
  import sys
  import librosa
  import numpy
  import soundfile
label_desc: Use image node_id 3 for calling a global function with example usage: apply_musan(audio, musan_dir) and returns: unknown