import tensorflow as tf

        rightmost_transposed_ndims = tf.size(
            input=perm, name='rightmost_transposed_ndims')
        rightmost_transposed_ndims_ = tf.get_static_value(
            rightmost_transposed_ndims)
