code: def preload(self, label, n_class, categorical_label):
      if categorical_label:
          # TODO: inspect assert bug
          # assert isinstance(n_class, int)
          return to_categorical([label], n_class)[0]
      else:
          return label
  
imports: from __future__ import division, print_function, absolute_import
  import os
  import random
  import numpy
  from PIL import Image
  import pickle
  import csv
  import warnings
  import tensorflow.compat.v1
  from io import BytesIO
label_desc: Use image node_id 2 for calling the LabelPreloader obj's underlying member method code with example usage: obj.preload(label, n_class, categorical_label) and returns: to_categorical, label