def get_key_from_dict (dictionary, key, group, required=True):
    """
    Grab a value from dictionary

    :param dictionary: Dictionary to utilize
    :param key: Key to fetch
    :param group: Group this key belongs to, used for error reporting purposes
    :param required: Boolean indicating whether this key is necessary for a valid manifest

    :return Value if found
    """

    if key not in dictionary:
        if required:
            raise KeyError ("Failed to generate manifest: {0} missing {1}".format (group, key))
        else:
            return None
    else:
        return dictionary[key]