def parse_command_query(query):
    params = dict(urlparse.parse_qsl(query))
    ret = {}
    
    expire = params.get('expire')
    if expire:
        interval = timeutil.parse_interval(expire)
        if interval is None:
            raise ValueError('Incorrect expire parameter value')
        ret['expire'] = str(interval)

    wait = params.get('wait')
    if wait:
        wait = wait.lower()
        if wait == 'true':
            ret['wait'] = wait
        else:
            raise ValueError('Incorrect wait parameter value')


    modify = params.get('modify')
    if modify:
        modify = modify.lower()
        if modify in ['insert', 'delete']:
            ret['modify'] = modify
        else:
            raise ValueError('Incorrect modify parameter value')
    return ret
dataset/ETHPy150Open securitykiss-com/rfw/rfw/cmdparse.py/parse_command_query/original