code: def make_ordered_one_hot_vectors(num, num_tokens):
      """Makes one hot vectors of size [num, num_tokens]."""
      num_repeats = int(np.ceil(num / float(num_tokens)))
      indices = tf.stack([tf.range(num_tokens)] * num_repeats)
      indices = tf.reshape(tf.transpose(indices), [-1])[0:num]
      return tf.one_hot(indices, depth=num_tokens)
  
file_path: magenta/magenta/models/gansynth/lib/util.py
imports: import io
  import os
  from absl import logging
  import numpy
  import tensorflow.compat.v1
  import tf_slim
label_desc: Use image node_id 3 for calling a global function with example usage: make_ordered_one_hot_vectors(num, num_tokens) and returns: tf