pub fn reverse_bits_len_circuit(
        &mut self,
        index_bits: Vec<Var<C::N>>,
        bit_len: usize,
    ) -> Vec<Var<C::N>> {
        assert!(bit_len <= NUM_BITS);
        let mut result_bits = Vec::new();
        for i in 0..bit_len {
            let idx = bit_len - i - 1;
            result_bits.push(index_bits[idx]);
        }
        result_bits
    }
Reverse a list of bits inside a circuit.

SAFETY: calling this function with `bit_len` greater [`NUM_BITS`] will result in undefined
behavior.

Reference: [p3_util::reverse_bits_len]
crates/recursion/compiler/src/ir/bits.rs