code: def random_labeling(num_classes, multi_label=False):
      label_values = np.arange(num_classes)
      if multi_label:
          num_labels = np.random.randint(num_classes)
          label = np.random.choice(
              label_values, num_labels, replace=False
          ).tolist()
      else:
          label = np.random.randint(num_classes)
      return label
  
imports: import string
  import numpy
  from collections import Counter
  from scipy import sparse
  from sklearn.datasets import fetch_20newsgroups
  from small_text.data.datasets import SklearnDataset, TextDataset
  from small_text.data.sampling import _get_class_histogram
  from small_text.utils.labels import csr_to_list, list_to_csr
label_desc: Use image node_id 3 for calling a global function with example usage: random_labeling(num_classes, multi_label) and returns: label