Extract iter_of_states.