'Race condition: We don\'t want to replay the flow while it is still live.'

@staticmethod
def wait_until_not_live(flow):

    s = time.time()
    while flow.live:
        time.sleep(0.001)
        if ((time.time() - s) > 5):
            raise RuntimeError('Flow    is    live    for    too    long.')
