Roll the tensor `A` forward `num_rolls` times

def _rollaxis_right(A, num_rolls):
    """ Roll the tensor `A` forward `num_rolls` times """
    assert num_rolls > 0
    rank = tf.rank(A)
    perm = tf.concat([rank - num_rolls + tf.range(num_rolls), tf.range(rank - num_rolls)], 0)
    return tf.transpose(A, perm)