code: def add_noise(
      wham_md_file, wham_dir, pair_noise, sources_list, sources_info
  ):
      # Get the row corresponding to the index
      noise = wham_md_file.loc[pair_noise]
      # Get the noise path
      try:
          noise_path = os.path.join(
              wham_dir, noise["origin_path"].values[0]
          )
      except AttributeError:
          noise_path = os.path.join(wham_dir, noise["origin_path"])
      # Read the noise
      n, _ = sf.read(noise_path, dtype="float32")
      # Keep the first channel
      if len(n.shape) > 1:
          n = n[:, 0]
      # Get expected length
      length = len(sources_list[0])
      # Pad if shorter
      if length > len(n):
          sources_list.append(
              np.pad(n, (0, length - len(n)), mode="constant")
          )
      # Cut if longer
      else:
          sources_list.append(n[:length])
      # Get relative path
      try:
          sources_info["noise_path"] = noise["origin_path"].values[0]
      except AttributeError:
          sources_info["noise_path"] = noise["origin_path"]
      return sources_info, sources_list
  
imports: import argparse
  import os
  import random
  import warnings
  import numpy
  import pandas
  import pyloudnorm
  import soundfile
  from tqdm import tqdm
label_desc: Use image node_id 10 for calling a global function with example usage: add_noise(wham_md_file, wham_dir, pair_noise, sources_list, sources_info) and returns: sources_info,  sources_list