code: def __init__(
      self,
      data_dir,
      split,
      sample_rate,
      max_sample_size=None,
      min_sample_size=0,
      shuffle=True,
      pad=False,
      normalize=False,
      num_buckets=0,
      compute_mask=False,
      **mask_compute_kwargs,
  ):
      super().__init__(
          sample_rate=sample_rate,
          max_sample_size=max_sample_size,
          min_sample_size=min_sample_size,
          shuffle=shuffle,
          pad=pad,
          normalize=normalize,
          compute_mask=compute_mask,
          **mask_compute_kwargs,
      )
  
      from fairseq.data import data_utils, Dictionary
  
      self.fnames_dict = Dictionary.load(
          os.path.join(data_dir, "dict.txt")
      )
  
      root_path = os.path.join(data_dir, f"{split}.root")
      if os.path.exists(root_path):
          with open(root_path, "r") as f:
              self.root_dir = next(f).strip()
      else:
          self.root_dir = None
  
      fnames_path = os.path.join(data_dir, split)
      self.fnames = data_utils.load_indexed_dataset(
          fnames_path, self.fnames_dict
      )
      lengths_path = os.path.join(data_dir, f"{split}.lengths")
  
      with open(lengths_path, "r") as f:
          for line in f:
              sz = int(line.rstrip())
              assert (
                  sz >= min_sample_size
              ), f"Min sample size is not supported for binarized dataset, but found a sample with size {sz}"
              self.sizes.append(sz)
  
      self.sizes = np.array(self.sizes, dtype=np.int64)
  
      self.set_bucket_info(num_buckets)
      logger.info(f"loaded {len(self.fnames)} samples")
  
imports: import logging
  import os
  import sys
  import time
  import io
  import numpy
  import torch
  import torch.nn.functional
  from ..None import FairseqDataset
  from ..data_utils import compute_block_mask_1d, get_buckets, get_bucketed_sizes
  from fairseq.data.audio.audio_utils import parse_path, read_from_stored_zip, is_sf_audio_data
  from fairseq.data.text_compressor import TextCompressor, TextCompressionLevel
label_desc: Use image node_id 1 to create a new BinarizedAudioDataset object from inherited base classes: RawAudioDataset with example: obj = BinarizedAudioDataset(data_dir, split, sample_rate, max_sample_size, min_sample_size, shuffle, pad, normalize, num_buckets, compute_mask)