code: def batch_to_time(x, block_size):
      """Inverse of `time_to_batch(x, block_size)`.
  
      Args:
        x: Tensor of shape [nb*block_size, k, n] for some natural number k.
        block_size: number of time steps (i.e. size of dimension 1) in the output
          tensor.
  
      Returns:
        Tensor of shape [nb, k*block_size, n].
      """
      shape = x.get_shape().as_list()
      y = tf.reshape(
          x, [shape[0] // block_size, block_size, shape[1], shape[2]]
      )
      y = tf.transpose(y, [0, 2, 1, 3])
      y = tf.reshape(
          y, [shape[0] // block_size, shape[1] * block_size, shape[2]]
      )
      y.set_shape(
          [
              mul_or_none(shape[0], 1.0 / block_size),
              mul_or_none(shape[1], block_size),
              shape[2],
          ]
      )
      return y
  
file_path: magenta/magenta/models/nsynth/wavenet/masked.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow.compat.v1
label_desc: Use image node_id 4 for calling a global function with example usage: batch_to_time(x, block_size) and returns: y