<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def transition(self, index, event_time):
 """Finds the population in each state and moves them to the next state. Parameters index : iterable of ints An iterable of integer labels for the simulants. event_time : pandas.Timestamp The time at which this transition occurs. """

        for state, affected in self._get_state_pops(index):
            if not affected.empty:
                state.next_state(affected.index, event_time, self.population_view.subview([self.state_column]))