def get_next():
    try:
        session = get_session()
    except ValueError:
        raise SGDBackendError('`fetch_next_result` has been called before `start_training`. Please call `start_training` before `fetch_next_result`.')
    try:
        result = session.get_next()
    except RuntimeError:
        raise SGDBackendError('`fetch_next_result` has been called before `start_training`. Please call `start_training` before `fetch_next_result`.')
    return result
def get_next():
    try:
        session = get_session()
    except ValueError:
        raise SGDBackendError('`fetch_next_result` has been called before `start_training`. Please call `start_training` before `fetch_next_result`.')
    try:
        result = session.get_next()
    except RuntimeError:
        raise SGDBackendError('`fetch_next_result` has been called before `start_training`. Please call `start_training` before `fetch_next_result`.')
    return result