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

def get(key, profile=None):
    '''
    Get a value from sqlite3
    '''
    if not profile:
        return None
    _, cur, table = _connect(profile)
    q = profile.get('get_query', ('SELECT value FROM {0} WHERE '
                                  'key=:key'.format(table)))
    res = cur.execute(q, {'key': key})
    res = res.fetchone()
    if not res:
        return None
    return salt.utils.msgpack.unpackb(res[0])