code: def dataset_labels(dataset):
      """
      Returns a sorted list of label name
      """
      labels = set([x.sentiment for x in dataset])
      if all(re.match("^[0-9]+$", label) for label in labels):
          # if all of the labels are integers, sort numerically
          # maybe not super important, but it would be nicer than having
          # 10 before 2
          labels = [str(x) for x in sorted(map(int, list(labels)))]
      else:
          labels = sorted(list(labels))
      return labels
  
imports: import collections
  from collections import namedtuple
  import logging
  import json
  import random
  import re
  from typing import List
  from stanza.models.classifiers.utils import WVType
  from stanza.models.common.vocab import PAD, PAD_ID, UNK, UNK_ID
  import stanza.models.constituency.tree_reader
label_desc: Use image node_id 3 for calling a global function with example usage: dataset_labels(dataset) and returns: labels