code: def make_interpolated_latent_vectors(num_rows, num_columns, **kwargs):
      """Returns a batch of linearly interpolated latent vectors.
  
      Given two randomly generated latent vector za and zb, it can generate
      a row of `num_columns` interpolated latent vectors, i.e.
      [..., za + (zb - za) * i / (num_columns - 1), ...] where
      i = 0, 1, ..., `num_columns` - 1.
  
      This function produces `num_rows` such rows and returns a (flattened)
      batch of latent vectors with batch size `num_rows * num_columns`.
  
      Args:
        num_rows: An integer. Number of rows of interpolated latent vectors.
        num_columns: An integer. Number of interpolated latent vectors in each row.
        **kwargs: A dictionary of
            'latent_vector_size': An integer of latent vector size.
  
      Returns:
        A `Tensor` of shape `[num_rows * num_columns, latent_vector_size]`.
      """
      ans = []
      for _ in range(num_rows):
          z = tf.random_normal([2, kwargs["latent_vector_size"]])
          r = tf.reshape(
              tf.to_float(tf.range(num_columns)) / (num_columns - 1),
              [-1, 1],
          )
          dz = z[1] - z[0]
          ans.append(z[0] + tf.stack([dz] * num_columns) * r)
      return tf.concat(ans, axis=0)
  
imports: import os
  import time
  from absl import logging
  from magenta.models.gansynth.lib import networks
  import numpy
  import tensorflow.compat.v1
  import tensorflow_gan
label_desc: Use image node_id 8 for calling a global function with example usage: make_interpolated_latent_vectors(num_rows, num_columns) and returns: tf