def wait_until_project_status_code_is(step, code1, code2, secs):
    start = datetime.utcnow()
    i_get_the_project(step, world.project['resource'])
    status = get_status(world.project)
    while (status['code'] != int(code1) and
           status['code'] != int(code2)):
        time.sleep(3)
        assert datetime.utcnow() - start < timedelta(seconds=int(secs))
        i_get_the_project(step, world.project['resource'])
        status = get_status(world.project)
    assert status['code'] == int(code1)
dataset/ETHPy150Open bigmlcom/python/bigml/tests/create_project_steps.py/wait_until_project_status_code_is/original