pub fn powers_of_two_below<T>(max: T, bits: u32) -> impl Iterator<Item = T>where
    T: One + PartialOrd + Shl<u32, Output = T> + Copy,