def get_config(self, credit_card):
        setting_name_base = 'LIVE' if not self.test_mode else 'TEST'
        setting_names = ['%s_%s' % (setting_name_base, CARD_NAMES[credit_card.card_type]),
                         setting_name_base]

        for name in setting_names:
            try:
                config_dict = self.config[name]
            except __HOLE__:
                continue
            return Config(config_dict)

        raise KeyError("Couldn't find key %s in config %s" % (' or '.join(setting_names), self.config))
dataset/ETHPy150Open agiliq/merchant/billing/gateways/global_iris_gateway.py/GlobalIrisBase.get_config