code: def get_flattened_unique_labels(dataset):
      if dataset.is_multi_label:
          labels = np.unique(dataset.y.indices)
      else:
          labels = np.unique(dataset.y)
      return np.setdiff1d(labels, np.array([LABEL_UNLABELED]))
  
file_path: small-text/small_text/utils/labels.py
imports: import numpy
  from scipy.sparse import csr_matrix
  from scipy.sparse import vstack
  from small_text.base import LABEL_UNLABELED
  from small_text.utils.annotations import deprecated
label_desc: Use image node_id 7 for calling a global function with example usage: get_flattened_unique_labels(dataset) and returns: np