code: def audio_collate_fn(batch: List[dict]):
      dataset_name_list = []
      audio_filepath_list = []
      audio_list = []
      audio_len_list = []
  
      for example in batch:
          dataset_name_list.append(example["dataset_name"])
          audio_filepath_list.append(example["audio_filepath"])
          audio_list.append(example["audio"])
          audio_len_list.append(example["audio_len"])
  
      batch_audio_len = torch.IntTensor(audio_len_list)
      audio_max_len = int(batch_audio_len.max().item())
  
      batch_audio = stack_tensors(audio_list, max_lens=[audio_max_len])
  
      batch_dict = {
          "dataset_names": dataset_name_list,
          "audio_filepaths": audio_filepath_list,
          "audio": batch_audio,
          "audio_lens": batch_audio_len,
      }
  
      return batch_dict
  
imports: import io
  import os
  from dataclasses import dataclass
  from pathlib import Path
  from typing import Dict, List, Optional
  import librosa
  import soundfile
  import torch.utils.data
  import webdataset
  from nemo.collections.asr.data.audio_to_text import expand_sharded_filepaths
  from nemo.collections.asr.parts.preprocessing.segment import available_formats
  from nemo.collections.asr.parts.utils.manifest_utils import read_manifest
  from nemo.collections.tts.parts.preprocessing.feature_processors import FeatureProcessor
  from nemo.collections.tts.parts.utils.tts_dataset_utils import filter_dataset_by_duration, get_weighted_sampler, load_audio, sample_audio, stack_tensors
  from nemo.core.classes import Dataset, IterableDataset
  from nemo.utils import logging
  from nemo.utils.decorators import experimental
label_desc: Use image node_id 1 for calling a global function with example usage: audio_collate_fn(batch) and returns: batch_dict