code: def get_num_classes(Y):
      if is_array(Y):
          # Assume max integer is number of classes
          return np.max(Y) + 1
      elif isinstance(Y, tf.Tensor):
          return ValueError(
              "Cannot automatically retrieve number of classes "
              "from a Tensor. Please fill 'num_classes' argument."
          )
      else:
          raise ValueError("Unknown data type.")
  
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 28 for calling a global function with example usage: get_num_classes(Y) and returns: unknown, ValueError