code: def count_occurence(manifest_file_id):
      """Count number of wav files in Dict manifest_file_id. Use for _TarredAudioToLabelDataset.
      Args:
          manifest_file_id (Dict): Dict of files and their corresponding id. {'A-sub0' : 1, ..., 'S-sub10':100}
      Returns:
          count (Dict): Dict of wav files {'A' : 2, ..., 'S':10}
      """
      count = dict()
      for i in manifest_file_id:
          audio_filename = i.split("-sub")[0]
          count[audio_filename] = count.get(audio_filename, 0) + 1
      return count
  
imports: import io
  import os
  from typing import Dict, List, Optional, Union
  import torch
  import webdataset
  from nemo.collections.asr.data.audio_to_text import cache_datastore_manifests, expand_sharded_filepaths
  from nemo.collections.asr.parts.preprocessing.features import WaveformFeaturizer
  from nemo.collections.asr.parts.preprocessing.segment import available_formats
  from nemo.collections.common.parts.preprocessing import collections
  from nemo.core.classes import Dataset, IterableDataset
  from nemo.core.neural_types import AudioSignal, LabelsType, LengthsType, NeuralType, RegressionValuesType
  from nemo.utils import logging
label_desc: Use image node_id 3 for calling a global function with example usage: count_occurence(manifest_file_id) and returns: count