code: def make_onehot(int_list, one_hot_length):
      """Convert each int to a one-hot vector.
  
      A one-hot vector is 0 everywhere except at the index equal to the
      encoded value.
  
      For example: 5 as a one-hot vector is [0, 0, 0, 0, 0, 1, 0, 0, 0, ...]
  
      Args:
        int_list: A list of ints, each of which will get a one-hot encoding.
        one_hot_length: The length of the one-hot vector to be created.
      Returns:
        A list of one-hot encodings of the ints.
      """
      return [
          [1.0 if j == i else 0.0 for j in range(one_hot_length)]
          for i in int_list
      ]
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import random
  from magenta.contrib import training
  import numpy
  import tensorflow.compat.v1
label_desc: Use image node_id 9 for calling a global function with example usage: make_onehot(int_list, one_hot_length) and returns: unknown