code: def _get_noise(
      self, goal_shape, always_2d=False, use_sample_rate=None
  ):
      agg_noise = np.zeros(goal_shape)
      len_dim = len(goal_shape) - 1
      is_2d = len(goal_shape) == 2
  
      n_noises = round(
          self.noise_rate * goal_shape[len_dim] / use_sample_rate
      )
      start_pointers = [
          round(rand_uniform(0, goal_shape[len_dim]))
          for _ in range(n_noises)
      ]
  
      for start_pointer in start_pointers:
          noise_shape = list(goal_shape)
          len_seconds = np.random.normal(
              self.noise_len_mean, self.noise_len_std
          )
          noise_shape[len_dim] = round(
              max(0, len_seconds) * use_sample_rate
          )
          end_pointer = start_pointer + noise_shape[len_dim]
          if end_pointer >= goal_shape[len_dim]:
              continue
  
          noise = self.pick_sample(
              noise_shape, always_2d, use_sample_rate
          )
          if is_2d:
              agg_noise[:, start_pointer:end_pointer] = (
                  agg_noise[:, start_pointer:end_pointer] + noise
              )
          else:
              agg_noise[start_pointer:end_pointer] = (
                  agg_noise[start_pointer:end_pointer] + noise
              )
  
      return agg_noise
  
imports: from pathlib import Path
  import numpy
  from math import ceil
  from fairseq.data.audio import rand_uniform
  from fairseq.data.audio.waveform_transforms import AudioWaveformTransform, register_audio_waveform_transform
label_desc: Use image node_id 3 for calling the SporadicNoiseAugmentTransform obj's underlying member method code with example usage: obj._get_noise(goal_shape, always_2d, use_sample_rate) and returns: agg_noise