async def retrain(context, loop):
    print('Start training...')
    start = time.time()
    async with context.pool.acquire() as conn:
        accessor = create_accessor(conn)
        content_frame = (await accessor.get_content_frame())
        rating_frame = (await accessor.get_vote_frame())
    print('Collected data in {}'.format((time.time() - start)))
    algorithm = ContentEngine(content_frame, rating_frame)
    predictor = AsyncContentWrapper(loop, context.executor, algorithm)
    (await predictor.fit())
    print('Completed training in {}s'.format((time.time() - start)))
    context.algorithm = algorithm
    context.predictor = predictor
async def retrain(context, loop):
    print('Start training...')
    start = time.time()
    async with context.pool.acquire() as conn:
        accessor = create_accessor(conn)
        content_frame = (await accessor.get_content_frame())
        rating_frame = (await accessor.get_vote_frame())
    print('Collected data in {}'.format((time.time() - start)))
    algorithm = ContentEngine(content_frame, rating_frame)
    predictor = AsyncContentWrapper(loop, context.executor, algorithm)
    (await predictor.fit())
    print('Completed training in {}s'.format((time.time() - start)))
    context.algorithm = algorithm
    context.predictor = predictor