code: def clean_spectrogram_batch(
      spectrogram: torch.Tensor,
      spectrogram_len: torch.Tensor,
      fill_value=0.0,
  ) -> torch.Tensor:
      """
      Fill spectrogram values outside the length with `fill_value`
  
      Args:
          spectrogram: Tensor with shape [B, C, L] containing batched spectrograms
          spectrogram_len: Tensor with shape [B] containing the sequence length of each batch element
          fill_value: value to fill with, 0.0 by default
  
      Returns:
          cleaned spectrogram, tensor with shape equal to `spectrogram`
      """
      device = spectrogram.device
      batch_size, _, max_len = spectrogram.shape
      mask = (
          torch.arange(max_len, device=device)[None, :]
          >= spectrogram_len[:, None]
      )
      mask = mask.unsqueeze(1).expand_as(spectrogram)
      return spectrogram.masked_fill(mask, fill_value)
  
imports: import math
  import random
  from typing import Optional, Tuple, Union
  import librosa
  import numpy
  import torch
  import torch.nn
  from nemo.collections.asr.parts.preprocessing.perturb import AudioAugmentor
  from nemo.collections.asr.parts.preprocessing.segment import AudioSegment
  from nemo.utils import logging
label_desc: Use image node_id 2 for calling a global function with example usage: clean_spectrogram_batch(spectrogram, spectrogram_len, fill_value) and returns: spectrogram