'Performs polling of CloudSearch to wait for the ``state``
of this object to change to the provided state.'

def wait_for_state(self, state):

    while (self.state != state):
        time.sleep(5)
        self.refresh()
