def calculate_conserved_dna(dna_fragments, dna_fragment_matches):
    """Calculate conserved DNA value for a set of DNA fragment matches.

    :param dna_fragments: A dict comprising information on DNA fragments.
    :param dna_fragment_matches: A dict comprising matches of DNA fragments.

    :rtype: conserved DNA value.
    """
    alignment_sum = 0
    for fm in dna_fragment_matches:
        rel_alignment_length = float(fm['alignment_length'] - fm[
            'no_non_identities']) / float(fm['length'])
        if rel_alignment_length > 0.9:
            alignment_sum += fm['alignment_length']
    genome_length = 0
    for fm in dna_fragments.values():
        genome_length += fm['length']
    return float(alignment_sum) / float(genome_length
        ) if genome_length > 0 else 0
