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

def _parse_key(key, profile):
    '''
    Parse out a key and update the opts with any override data
    '''
    comps = key.split('?')
    if len(comps) > 1:
        for item in comps[1].split('&'):
            newkey, newval = item.split('=')
            profile[newkey] = newval
    if 'cachedir' in profile:
        __opts__['cachedir'] = profile['cachedir']
    return comps[0], profile