def get_required_key(key, config):
    """
    Standardizes error checking for loading a key from config
    """
    try:
        return config[key]
    except KeyError:
        raise ValueError(
            '"{}" is a required key in your config file.'.format(key)
        )