class_docstr: Create a Dataset for HuBERT model training and fine-tuning.
  
  Args:
      exp_dir (str or Path): The root directory of the ``.tsv`` file list.
      dataset (str): The dataset for training. Options: [``librispeech``, ``librilight``].
      subset (str): The subset of the dataset. Options: [``train``, ``valid``].
class_docstr_tok: ["Create","a","Dataset","for","HuBERT","model","training","and","fine-tuning",".","Args",":","exp_dir","(","str","or","Path",")",":","The","root","directory","of","the","``",".tsv","``","file","list",".","dataset","(","str",")",":","The","dataset","for","training",".","Options",":","[","``","librispeech","``",",","``","librilight","``","]",".","subset","(","str",")",":","The","subset","of","the","dataset",".","Options",":","[","``","train","``",",","``","valid","``","]","."]
docstr: Load all labels to memory into a numpy array.
  Args:
      label_dir (Path): The directory that contains the label file.
      dataset (str): The dataset for training. Options: [``librispeech``, ``librilight``].
      subset (str): The subset of the dataset. Options: [``train``, ``valid``].
  
  Returns:
      (np.array): The numpy arrary that contains the labels for each audio file.
docstr_tok: ["Load","all","labels","to","memory","into","a","numpy","array",".","Args",":","label_dir","(","Path",")",":","The","directory","that","contains","the","label","file",".","dataset","(","str",")",":","The","dataset","for","training",".","Options",":","[","``","librispeech","``",",","``","librilight","``","]",".","subset","(","str",")",":","The","subset","of","the","dataset",".","Options",":","[","``","train","``",",","``","valid","``","]",".","Returns",":","(","np.array",")",":","The","numpy","arrary","that","contains","the","labels","for","each","audio","file","."]
code: def _load_labels(
      self, label_dir: Path, dataset: str, subset: str
  ) -> np.array:
      """Load all labels to memory into a numpy array.
      Args:
          label_dir (Path): The directory that contains the label file.
          dataset (str): The dataset for training. Options: [``librispeech``, ``librilight``].
          subset (str): The subset of the dataset. Options: [``train``, ``valid``].
  
      Returns:
          (np.array): The numpy arrary that contains the labels for each audio file.
      """
      with open(label_dir / f"label_{subset}.pt") as f:
          labels = [line.rstrip() for line in f]
          labels = [labels[i] for i in self.ind_list]
      return np.asarray(labels, dtype=np.string_)
  
imports: import math
  import os
  import sys
  from pathlib import Path
  from typing import Dict, Iterator, List, Optional, Tuple, Union
  import numpy
  import torch
  import torch.distributed
  import torchaudio
  from torch import Tensor
  from torch.utils.data import BatchSampler, Dataset, DistributedSampler
  from utils import _get_label2id
label_desc: Use image node_id 5 for calling the HuBERTDataSet obj's underlying member method code with example usage: obj._load_labels(label_dir, dataset, subset) and returns: np