code: def read_lab(tsv_path, lab_path, pad_len=0, upsample=1):
      """
      tsv is needed to retrieve the uids for the labels
      """
      with open(tsv_path) as f:
          f.readline()
          uids = [
              op.splitext(op.basename(line.rstrip().split()[0]))[0]
              for line in f
          ]
      with open(lab_path) as f:
          labs_list = [
              pad(line.rstrip().split(), pad_len).repeat(upsample)
              for line in f
          ]
      assert len(uids) == len(labs_list)
      return dict(zip(uids, labs_list))
  
file_path: fairseq/examples/hubert/measure_teacher_quality.py
imports: import numpy
  import os.path
  import re
  from tabulate import tabulate
  from collections import Counter
label_desc: Use image node_id 8 for calling a global function with example usage: read_lab(tsv_path, lab_path, pad_len, upsample) and returns: dict