code: def wait(self):
          
          interval_seconds = 5
          while True:
              actions = self.actions()
              slept = False
              for a in actions:
                  if a['status'] == 'in-progress':
                      # n.b. gevent will monkey patch
                      time.sleep(interval_seconds)
                      slept = True
                      break
              if not slept:
                  break
docs: wait for all actions to complete on a droplet