class_docstr: The virtual base class for nlp datasets, such TextClassificationDataset, SeqLabelingDataset, and so on.
  The base class must be supered and re-implemented the method _read_file.
class_docstr_tok: ["The","virtual","base","class","for","nlp","datasets",",","such","TextClassificationDataset",",","SeqLabelingDataset",",","and","so","on",".","The","base","class","must","be","supered","and","re-implemented","the","method","_read_file","."]
docstr: Loads labels from label file.
docstr_tok: ["Loads","labels","from","label","file","."]
code: def _load_label_data(self):
      """
      Loads labels from label file.
      """
      if os.path.exists(self.label_file):
          with open(self.label_file, "r", encoding="utf8") as f:
              return f.read().strip().split("\n")
      else:
          raise RuntimeError(
              "The file {} is not found.".format(self.label_file)
          )
  
imports: import csv
  import io
  import os
  from typing import Dict, List, Optional, Union, Tuple
  import numpy
  import paddle
  import paddlenlp
  from packaging.version import Version
  from paddlehub.env import DATA_HOME
  from paddlenlp.transformers import PretrainedTokenizer
  from paddlenlp.data import JiebaTokenizer
  from paddlehub.utils.log import logger
  from paddlehub.utils.utils import download, reseg_token_label, pad_sequence, trunc_sequence
  from paddlehub.utils.xarfile import is_xarfile, unarchive
label_desc: Use image node_id 2 for calling the BaseNLPDataset obj's underlying member method code with example usage: obj._load_label_data() and returns: f