code: def test_tarred_dataset(self, test_data_dir):
      manifest_path = os.path.abspath(
          os.path.join(
              test_data_dir, "asr/tarred_an4/tarred_audio_manifest.json"
          )
      )
  
      # Test braceexpand loading
      tarpath = os.path.abspath(
          os.path.join(test_data_dir, "asr/tarred_an4/audio_{0..1}.tar")
      )
      featurizer = WaveformFeaturizer(
          sample_rate=16000, int_values=False, augmentor=None
      )
      ds_braceexpand = TarredAudioToClassificationLabelDataset(
          audio_tar_filepaths=tarpath,
          manifest_filepath=manifest_path,
          labels=self.labels,
          featurizer=featurizer,
      )
  
      assert len(ds_braceexpand) == 32
      count = 0
      for _ in ds_braceexpand:
          count += 1
      assert count == 32
  
      # Test loading via list
      tarpath = [
          os.path.abspath(
              os.path.join(
                  test_data_dir, f"asr/tarred_an4/audio_{i}.tar"
              )
          )
          for i in range(2)
      ]
      ds_list_load = TarredAudioToClassificationLabelDataset(
          audio_tar_filepaths=tarpath,
          manifest_filepath=manifest_path,
          labels=self.labels,
          featurizer=featurizer,
      )
      count = 0
      for _ in ds_list_load:
          count += 1
      assert count == 32
  
file_path: NeMo/tests/collections/asr/test_label_datasets.py
imports: import json
  import os
  import tempfile
  import numpy
  import pytest
  import soundfile
  import torch
  from nemo.collections.asr.data.audio_to_label import AudioToMultiLabelDataset, TarredAudioToClassificationLabelDataset
  from nemo.collections.asr.data.feature_to_label import FeatureToLabelDataset, FeatureToSeqSpeakerLabelDataset
  from nemo.collections.asr.parts.preprocessing.feature_loader import ExternalFeatureLoader
  from nemo.collections.asr.parts.preprocessing.features import WaveformFeaturizer
label_desc: Use image node_id 1 for calling the TestASRDatasets obj's underlying member method code with example usage: obj.test_tarred_dataset(test_data_dir) without return types