def _pad_mics_tf(signal, new_mics):
  """Pads new mic channels to an input tensor and returns the updated tensor.

  Args:
    signal: A tf.tensor of shape (input_mics, samples)
    new_mics: The number of new mic channels to be added (integer scalar tensor)
  Returns:
    padded_signal: A tf.tensor of shape (input_mics + new_mics, samples)
  """
  # Take first new_mics channels and shift them by 1 sample.
  new_inputs = tf.roll(signal[:new_mics, :], shift=1, axis=-1)
  # Add noise 1e-3 times the RMS value in the signal.
  noise_scale = 1e-3 * tf.sqrt(tf.reduce_mean(tf.square(new_inputs)))
  new_inputs += noise_scale * tf.random.normal(tf.shape(new_inputs))
  return tf.concat((signal, new_inputs), axis=0)