code: def one_hotify(labels, pad=-1):
      """
      cast label to one hot vector
      """
      num_instances = len(labels)
      if pad <= 0:
          dim_embedding = np.max(labels) + 1  # zero-indexed assumed
      else:
          assert (
              pad > 0
          ), "result_dim for padding one hot embedding not set!"
          dim_embedding = pad + 1
      embeddings = np.zeros((num_instances, dim_embedding))
      embeddings[np.arange(num_instances), labels] = 1
  
      return embeddings
  
label_desc: Use image node_id 1 for calling a global function with example usage: one_hotify(labels, pad) and returns: embeddings