<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def returner(ret):
    '''
    Log outcome to sentry. The returner tries to identify errors and report
    them as such. All other messages will be reported at info level.
    Failed states will be appended as separate list for convenience.
    '''

    try:
        _connect_sentry(_get_message(ret), ret)
    except Exception as err:
        log.error('Can\'t run connect_sentry: %s', err, exc_info=True)