code: def wrap_target_dataset(infer_manifest, dataset, task):
      label_path = infer_manifest.replace(".tsv", ".label")
      with open(label_path, "r") as f:
          labels = f.read().strip().split("\n")
          assert len(labels) == len(dataset)
      process_label = LabelEncoder(task.target_dictionary)
      dataset = AddTargetDataset(
          dataset,
          labels,
          pad=task.target_dictionary.pad(),
          eos=task.target_dictionary.eos(),
          batch_targets=True,
          process_label=process_label,
          add_to_input=False,
      )
      return dataset
  
file_path: fairseq/examples/wav2vec/xlsr/scripts/gen_audio_embedding.py
imports: import torch
  from fairseq import checkpoint_utils, distributed_utils, options, utils
  from fairseq.dataclass.utils import convert_namespace_to_omegaconf
  from fairseq.logging import metrics, progress_bar
  from fairseq import checkpoint_utils, data, options, tasks
  from fairseq.data import FileAudioDataset, AddTargetDataset, Dictionary
  from fairseq.tasks.audio_classification import LabelEncoder
  import ipdb
  import copy
  import sys
  from tqdm import tqdm
  import tempfile
  import numpy
  import sklearn
label_desc: Use image node_id 2 for calling a global function with example usage: wrap_target_dataset(infer_manifest, dataset, task) and returns: dataset