class_docstr: A similar Dataset to the VocoderDataset, but loads tarred audio files.
  
  Accepts a single comma-separated JSON manifest file (in the same style as for the VocoderDataset),
  as well as the path(s) to the tarball(s) containing the wav files. Each line of the manifest should
  contain the information for one audio file, and duration of audio.
  
  Valid formats for the audio_tar_filepaths argument include:
  (1) a single string that can be brace-expanded, e.g. 'path/to/audio.tar' or 'path/to/audio_{1..100}.tar.gz', or
  (2) a list of file paths that will not be brace-expanded, e.g. ['audio_1.tar', 'audio_2.tar', ...].
  
  See the WebDataset documentation for more information about accepted data and input formats.
  
  If using multiple processes the number of shards should be divisible by the number of workers to ensure an
  even split among workers. If it is not divisible, logging will give a warning but training will proceed.
  In addition, if using mutiprocessing, each shard MUST HAVE THE SAME NUMBER OF ENTRIES after filtering
  is applied. We currently do not check for this, but your program may hang if the shards are uneven!
  
  Additionally, please note that the len() of this DataLayer is assumed to be the length of the manifest
  after filtering. An incorrect manifest length may lead to some DataLoader issues down the line.
  
  Args:        
      dataset_meta: Dict of dataset names (string) to dataset metadata.
      audio_tar_filepaths: Either a list of audio tarball filepaths, or a
          string (can be brace-expandable).
      sample_rate: Sample rate to load audio as. If the audio is stored at a different sample rate, then it will
          be resampled.
      n_samples: Optional int, if provided then n_samples samples will be randomly sampled from the full
          audio file.
      shuffle_n (int): How many samples to look ahead and load to be shuffled.
          See WebDataset documentation for more details.
          Defaults to 0.
      min_duration: Optional float, if provided audio files in the training manifest shorter than 'min_duration'
          will be ignored.
      max_duration: Optional float, if provided audio files in the training manifest longer than 'max_duration'
          will be ignored.
      trunc_duration: Optional int, if provided audio will be truncated to at most 'trunc_duration' seconds.
      feature_processors: Optional, list of feature processors to run on training examples.
      shard_strategy (str): Tarred dataset shard distribution strategy chosen as a str value during ddp.
          -   `scatter`: The default shard strategy applied by WebDataset, where each node gets
              a unique set of shards, which are permanently pre-allocated and never changed at runtime.
          -   `replicate`: Optional shard strategy, where each node gets all of the set of shards
              available in the tarred dataset, which are permanently pre-allocated and never changed at runtime.
              The benefit of replication is that it allows each node to sample data points from the entire
              dataset independently of other nodes, and reduces dependence on value of `shuffle_n`.
  
              .. warning::
                  Replicated strategy allows every node to sample the entire set of available tarfiles,
                  and therefore more than one node may sample the same tarfile, and even sample the same
                  data points! As such, there is no assured guarantee that all samples in the dataset will be
                  sampled at least once during 1 epoch. Scattered strategy, on the other hand, on specific
                  occasions (when the number of shards is not divisible with ``world_size``), will not sample
                  the entire dataset. For these reasons it is not advisable to use tarred datasets as validation
                  or test datasets.
      global_rank (int): Worker rank, used for partitioning shards. Defaults to 0.
      world_size (int): Total number of processes, used for partitioning shards. Defaults to 0.
code: def collate_fn(self, batch):
      return audio_collate_fn(batch)
  
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 5 for calling the TarredVocoderDataset obj's underlying member method code with example usage: obj.collate_fn(batch) and returns: audio_collate_fn