class_docstr: This class implements ambient noise augmentation for audio.
docstr: This method caches a list of noise files for on the fly augmentation.
docstr_tok: ["This","method","caches","a","list","of","noise","files","for","on","the","fly","augmentation","."]
code: def load_noise_files(self, cache_size: int) -> List[torch.TensorType]:
      """
      This method caches a list of noise files for on the fly augmentation.
      """
      noise_waves = []
      for i in range(cache_size):
          noise_wav_file = self.noise_files[
              self.pointer % len(self.noise_files)
          ]
          self.pointer += 1
          noise, sample_rate = torchaudio.load(noise_wav_file)
          assert (
              noise.dtype == torch.float32
          ), f"Expected noise file {noise_wav_file} to decode to float32 audio, but got {noise.dtype}."
          noise_waves.append((noise, sample_rate))
      return noise_waves
  
imports: import argparse
  import math
  import pathlib
  import random
  from typing import Callable, Dict, List, Optional, Union
  import torch
  import torchaudio
  from data.transforms import TRANSFORMATIONS_REGISTRY, BaseTransformation
  from data.transforms.audio_aux import mfccs
label_desc: Use image node_id 2 for calling the Noise obj's underlying member method code with example usage: obj.load_noise_files(cache_size) and returns: noise_waves