def get_setting(default_setting, custom_config, config_key):
    """
    Args:
        default_setting:  The default setting to use
        custom_config: dict, the custom configuration dictionary
        config_key: string, the key of the setting in the custom_config variable

    Returns:
        default_settings if config_key is not in custom_config,
        otherwise return custom_config[config_key]
    """

    if custom_config and config_key in custom_config:
        return custom_config[config_key]
    else:
        return default_setting