code: def append_eos(sample, categorical, feature_dim):
      if not categorical:
          eos = -1 * np.ones(feature_dim)
      else:
          eos = np.zeros(feature_dim)
          eos[0] = 1.0
      sample.append(eos)
      return sample
  
imports: import io
  import numpy
  from PIL import Image
  from six.moves import zip_longest
  from skimage import draw
  import tensorflow.compat.v1
label_desc: Use image node_id 28 for calling a global function with example usage: append_eos(sample, categorical, feature_dim) and returns: sample