code: def collate_fn(self, batch):
      labels = []
      feats = []
      for speaker in batch:
          if (
              random.random() < self.sample_from_storage_p
              and self.storage.full()
          ):
              # sample from storage (if full), ignoring the speaker
              wavs_, labels_ = random.choice(self.storage.queue)
          else:
              # don't sample from storage, but from HDD
              wavs_, labels_ = self.__sample_speaker_utterances(speaker)
              # if storage is full, remove an item
              if self.storage.full():
                  _ = self.storage.get_nowait()
              # put the newly loaded item into storage
              self.storage.put_nowait((wavs_, labels_))
  
          # add random gaussian noise
          if self.additive_noise > 0:
              noises_ = [
                  numpy.random.normal(
                      0, self.additive_noise, size=len(w)
                  )
                  for w in wavs_
              ]
              wavs_ = [wavs_[i] + noises_[i] for i in range(len(wavs_))]
  
          # get a random subset of each of the wavs and convert to MFCC.
          offsets_ = [
              random.randint(0, wav.shape[0] - self.seq_len)
              for wav in wavs_
          ]
          mels_ = [
              self.ap.melspectrogram(
                  wavs_[i][offsets_[i] : offsets_[i] + self.seq_len]
              )
              for i in range(len(wavs_))
          ]
          feats_ = [torch.FloatTensor(mel) for mel in mels_]
  
          labels.append(labels_)
          feats.extend(feats_)
      feats = torch.stack(feats)
      return feats.transpose(1, 2), labels
  
file_path: TTS/TTS/speaker_encoder/dataset.py
imports: import numpy
  import numpy
  import queue
  import torch
  import random
  from torch.utils.data import Dataset
  from tqdm import tqdm
label_desc: Use image node_id 9 for calling the MyDataset obj's underlying member method code with example usage: obj.collate_fn(batch) and returns: feats,  labels