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

def _snapper_pre(opts, jid):
    '''
    Create a snapper pre snapshot
    '''
    snapper_pre = None
    try:
        if not opts['test'] and __opts__.get('snapper_states'):
            # Run the snapper pre snapshot
            snapper_pre = __salt__['snapper.create_snapshot'](
                    config=__opts__.get('snapper_states_config', 'root'),
                    snapshot_type='pre',
                    description='Salt State run for jid {0}'.format(jid),
                    __pub_jid=jid)
    except Exception:
        log.error('Failed to create snapper pre snapshot for jid: %s', jid)
    return snapper_pre