def get_cfgx_with_param(testres, key, val):
    '\n        Gets configs where the given parameter is held constant\n        '
    if (key == 'len(daids)'):
        cfgx_list = [cfgx for (cfgx, daids) in enumerate(testres.cfgx2_daids) if (len(daids) == val)]
    elif any([(key in cfgdict) for cfgdict in testres.varied_cfg_list]):
        cfgx_list = [cfgx for (cfgx, cfgdict) in enumerate(testres.varied_cfg_list) if (cfgdict[key] == val)]
    elif any([(key in cfgdict) for cfgdict in testres.varied_acfg_list]):
        cfgx_list = [cfgx for (cfgx, acfg) in enumerate(testres.varied_acfg_list) if (acfg[key] == val)]
    elif (key in testres.common_cfgdict):
        cfgx_list = list(range(testres.nConfig))
    elif (key in testres.nonvaried_acfg):
        cfgx_list = list(range(testres.nConfig))
    else:
        assert False, ('param=%r doesnt exist' % (key,))
    return cfgx_list
Gets configs where the given parameter is held constant
def get_cfgx_with_param(testres, key, val):
    '\n        \n        '
    if (key == 'len(daids)'):
        cfgx_list = [cfgx for (cfgx, daids) in enumerate(testres.cfgx2_daids) if (len(daids) == val)]
    elif any([(key in cfgdict) for cfgdict in testres.varied_cfg_list]):
        cfgx_list = [cfgx for (cfgx, cfgdict) in enumerate(testres.varied_cfg_list) if (cfgdict[key] == val)]
    elif any([(key in cfgdict) for cfgdict in testres.varied_acfg_list]):
        cfgx_list = [cfgx for (cfgx, acfg) in enumerate(testres.varied_acfg_list) if (acfg[key] == val)]
    elif (key in testres.common_cfgdict):
        cfgx_list = list(range(testres.nConfig))
    elif (key in testres.nonvaried_acfg):
        cfgx_list = list(range(testres.nConfig))
    else:
        assert False, ('param=%r doesnt exist' % (key,))
    return cfgx_list