def _guard_valid_name(name: str): if name not in get_defaults().keys(): raise errors.UnknownConfigurationError(name)
def _guard_valid_config_name(config: Any, name: str): if name not in config["configurations"]: raise errors.UnknownConfigurationError(name)
def _guard_valid_config_name(config: Any, name: str): configurations = config.get('configurations', {}) if name not in configurations: raise errors.UnknownConfigurationError(name)