class_docstr: Dataset class for classifiers from Transformers Integration.
      
class_docstr_tok: ["Dataset","class","for","classifiers","from","Transformers","Integration","."]
code: def _get_flattened_labels(self):
      label_list = [
          d[self.INDEX_LABEL] if d[self.INDEX_LABEL] is not None else []
          for d in self._data
      ]
      if self.multi_label:
          label_list = [label for lst in label_list for label in lst]
  
      label_list = [
          label for label in label_list if label > LABEL_UNLABELED
      ]
  
      return label_list
  
imports: import numpy
  from scipy.sparse import csr_matrix
  from small_text.base import LABEL_UNLABELED
  from small_text.data.datasets import check_size, check_target_labels, get_updated_target_labels
  from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
  from small_text.utils.annotations import experimental
  from small_text.utils.labels import csr_to_list, get_num_labels, list_to_csr
label_desc: Use image node_id 3 for calling the TransformersDataset obj's underlying member method code with example usage: obj._get_flattened_labels() and returns: label_list