code: def reverb(
      audio: Union[str, np.ndarray],
      sample_rate: int = DEFAULT_SAMPLE_RATE,
      reverberance: float = 50.0,
      hf_damping: float = 50.0,
      room_scale: float = 100.0,
      stereo_depth: float = 100.0,
      pre_delay: float = 0.0,
      wet_gain: float = 0.0,
      wet_only: bool = False,
      output_path: Optional[str] = None,
      metadata: Optional[List[Dict[str, Any]]] = None,
  ) -> Tuple[np.ndarray, int]:
      """
      Adds reverberation to the audio
  
      @param audio: the path to the audio or a variable of type np.ndarray that
          will be augmented
  
      @param sample_rate: the audio sample rate of the inputted audio
  
      @param reverberance: (%) sets the length of the reverberation tail. This determines
          how long the reverberation continues for after the original sound being reverbed
          comes to an end, and so simulates the "liveliness" of the room acoustics
  
      @param hf_damping: (%) increasing the damping produces a more "muted" effect. The
          reverberation does not build up as much, and the high frequencies decay faster
          than the low frequencies
  
      @param room_scale: (%) sets the size of the simulated room. A high value will
          simulate the reverberation effect of a large room and a low value will simulate
          the effect of a small room
  
      @param stereo_depth: (%) sets the apparent "width" of the reverb effect for stereo
          tracks only. Increasing this value applies more variation between left and right
          channels, creating a more "spacious" effect. When set at zero, the effect is
          applied independently to left and right channels
  
      @param pre_delay: (ms) delays the onset of the reverberation for the set time after
          the start of the original input. This also delays the onset of the reverb tail
  
      @param wet_gain: (db) applies volume adjustment to the reverberation ("wet")
          component in the mix
  
      @param wet_only: only the wet signal (added reverberation) will be in the resulting
          output, and the original audio will be removed
  
      @param output_path: the path in which the resulting audio will be stored. If None,
          the resulting np.ndarray will still be returned
  
      @param metadata: if set to be a list, metadata about the function execution
          including its name, the source & dest duration, sample rates, etc. will be
          appended to the inputted list. If set to None, no metadata will be appended
  
      @returns: the augmented audio array and sample rate
      """
      assert isinstance(
          reverberance, (int, float)
      ), "Expected 'reverberance' to be a number"
      assert isinstance(
          hf_damping, (int, float)
      ), "Expected 'hf_damping' to be a number"
      assert isinstance(
          room_scale, (int, float)
      ), "Expected 'room_scale' to be a number"
      assert isinstance(
          stereo_depth, (int, float)
      ), "Expected 'stereo_depth' to be a number"
      assert isinstance(
          pre_delay, (int, float)
      ), "Expected 'pre_delay' to be a number"
      assert isinstance(
          wet_gain, (int, float)
      ), "Expected 'wet_gain' to be a number"
      assert isinstance(
          wet_only, bool
      ), "Expected 'wet_only' to be a number"
      audio, sample_rate = audutils.validate_and_load_audio(
          audio, sample_rate
      )
  
      if metadata is not None:
          func_kwargs = deepcopy(locals())
          func_kwargs.pop("metadata")
  
      aug_audio = (
          audio.reshape((1, audio.shape[-1]))
          if audio.ndim == 1
          else audio
      )
  
      effect = ["reverb"]
      if wet_only:
          effect.append("-w")
  
      aug_audio, out_sample_rate = sox_effects.apply_effects_tensor(
          torch.Tensor(aug_audio),
          sample_rate,
          [
              effect
              + [
                  str(reverberance),
                  str(hf_damping),
                  str(room_scale),
                  str(stereo_depth),
                  str(pre_delay),
                  str(wet_gain),
              ]
          ],
      )
  
      aug_audio = aug_audio.numpy()
      if audio.shape[0] == 1:
          aug_audio = aug_audio.reshape((aug_audio.shape[-1],))
  
      if metadata is not None:
          audutils.get_metadata(
              metadata=metadata,
              function_name="reverb",
              dst_audio=aug_audio,
              dst_sample_rate=out_sample_rate,
              # pyre-fixme[61]: `func_kwargs` may not be initialized here.
              **func_kwargs,
          )
  
      return audutils.ret_and_save_audio(
          aug_audio, output_path, out_sample_rate
      )
  
imports: from copy import deepcopy
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import numpy
  import torch
  from augly.audio import utils
  from augly.utils import DEFAULT_SAMPLE_RATE
  from augly.utils.libsndfile import install_libsndfile
  import librosa
  from torchaudio import sox_effects
  from torchaudio.functional import fftconvolve, resample
label_desc: Use image node_id 16 for calling a global function with example usage: reverb(audio, sample_rate, reverberance, hf_damping, room_scale, stereo_depth, pre_delay, wet_gain, wet_only, output_path, metadata) and returns: audutils