def _wait_for_state_change(self, target_states, update_interval=<NUM_LIT:10>):
while self.state not in target_states:<EOL><INDENT>if self.state == '<STR_LIT:error>':<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>sleep(update_interval)<EOL>self.populate()<EOL><DEDENT>
Blocking wait until target_state reached. update_interval is in seconds.

Warning: state change must begin before calling this method.