def METHOD_NAME(self):
    for _ in range(MAX_CONNECTION_RETRIES):
        if self.server.state != ServerStates.NOT_INITIALIZED and self.keepalive_server.state != ServerStates.NOT_INITIALIZED:
            return
        time.sleep(0.1)
    raise ParallelServerIsDown("Cannot connect to XML_RPC server")