def _parse_kwconfigs(kwconfigs):
    """Allow logger = {'level': 'debug'} to be
    specified as logger_level = 'debug'"""
    ret = {}
    if isinstance(kwconfigs.get('runner'), str):
        ret['runner'] = dict(runner=kwconfigs.pop('runner'))
    for key, val in kwconfigs.items():
        if key[:7] == 'logger_':
            ret.setdefault('logger', {})[key[7:]] = val
        elif key[:7] == 'runner_':
            ret.setdefault('runner', {})[key[7:]] = val
        elif key[:5] == 'envs_':
            ret.setdefault('envs', {})[key[5:]] = val
        elif key[:7] == 'config_':
            ret.setdefault('config', {})[key[7:]] = val
        else:
            ret[key] = val
    return ret
