code: def normalize(
      audio: Union[str, np.ndarray],
      sample_rate: int = DEFAULT_SAMPLE_RATE,
      norm: Optional[float] = np.inf,
      axis: int = 0,
      threshold: Optional[float] = None,
      fill: Optional[bool] = None,
      output_path: Optional[str] = None,
      metadata: Optional[List[Dict[str, Any]]] = None,
  ) -> Tuple[np.ndarray, int]:
      """
      Normalizes the audio array along the chosen axis (norm(audio, axis=axis) == 1)
  
      @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 norm: the type of norm to compute:
          - np.inf: maximum absolute value
          - -np.inf: minimum absolute value
          - 0: number of non-zeros (the support)
          - float: corresponding l_p norm
          - None: no normalization is performed
  
      @param axis: axis along which to compute the norm
  
      @param threshold: if provided, only the columns (or rows) with norm of at
          least `threshold` are normalized
  
      @param fill: if None, then columns (or rows) with norm below `threshold` are left
          as is. If False, then columns (rows) with norm below `threshold` are set to 0.
          If True, then columns (rows) with norm below `threshold` are filled uniformly
          such that the corresponding norm is 1
  
      @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(axis, int) and axis >= 0
      ), "Expected 'axis' to be a nonnegative number"
      assert threshold is None or isinstance(
          threshold, (int, float)
      ), "Expected 'threshold' to be a number or None"
      assert fill is None or isinstance(
          fill, bool
      ), "Expected 'threshold' to be a boolean or None"
      audio, sample_rate = audutils.validate_and_load_audio(
          audio, sample_rate
      )
  
      if metadata is not None:
          func_kwargs = deepcopy(locals())
          func_kwargs["norm"] = str(func_kwargs["norm"])
          func_kwargs.pop("metadata")
  
      aug_audio = librosa.util.normalize(
          audio, norm=norm, axis=axis, threshold=threshold, fill=fill
      )
  
      if metadata is not None:
          audutils.get_metadata(
              metadata=metadata,
              function_name="normalize",
              dst_audio=aug_audio,
              dst_sample_rate=sample_rate,
              # pyre-fixme[61]: `func_kwargs` may not be initialized here.
              **func_kwargs,
          )
  
      return audutils.ret_and_save_audio(
          aug_audio, output_path, 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 12 for calling a global function with example usage: normalize(audio, sample_rate, norm, axis, threshold, fill, output_path, metadata) and returns: audutils