def _create_with_wait(snapshot, wait_timeout_secs, sleep_func=time.sleep):
 time_waited = 0
 snapshot.update()
 while (snapshot.status != 'completed'):
  sleep_func(3)
  snapshot.update()
  time_waited += 3
  if (wait_timeout_secs and (time_waited > wait_timeout_secs)):
   return False
 return True

def _create_with_wait ( snapshot , wait_timeout_secs , sleep_func = time . sleep ) : time_waited = 0 snapshot . update ( ) while ( snapshot . status != 'completed' ) : sleep_func ( 3 ) snapshot . update ( ) time_waited += 3 if ( wait_timeout_secs and ( time_waited > wait_timeout_secs ) ) : return False return True
wait for the snapshot to be created .