def wait_for_completion(job):
    while True:
        time.sleep(2)
        resp = job.status()
        if (resp['status'] != 'ok'):
            print(f'Error:', resp['message'])
            return
        info = resp['info']
        print(f"	Status: {info['status']}")
        if (info['status'] in ['done', 'error', 'failed', 'unknown job']):
            if (info['status'] == 'done'):
                load(job)
                print('done')
            return
def wait_for_completion(job):
    while True:
        time.sleep(2)
        resp = job.status()
        if (resp['status'] != 'ok'):
            print(f'Error:', resp['message'])
            return
        info = resp['info']
        print(f"	Status: {info['status']}")
        if (info['status'] in ['done', 'error', 'failed', 'unknown job']):
            if (info['status'] == 'done'):
                load(job)
                print('done')
            return