def _get_config_for_group()

in smdebug_rulesconfig/debugger_rules/_utils.py [0:0]


def _get_config_for_group(rules):
    rules_config = []

    config_file_path = os.path.dirname(os.path.abspath(__file__)) + "/" + RULE_CONFIG_FILE

    if os.path.exists(config_file_path):
        with open(config_file_path) as json_data:
            configs = json.load(json_data)
            for rule_name in rules:
                if rule_name in configs:
                    rules_config.append(configs[rule_name])
    return rules_config