pub fn expected_node_index( bit_pos: u32, registry: &RegistryView, apply_remove_remap: bool, ) -> u32