def flatten(report):
    """ Flatten a tssv json report to make it easier to work with

    1. Only include the 'marker' section
    2. Merge the 'known' and 'new' sections together, since they hold the same
        information
    3. Instead of a list of alleles, make it a dict with the allele as key
    """
    # 1. Only include the marker section
    flat = report['marker']

    for marker in flat:
        # 2. Combine 'known' and 'new' into a single list
        alleles = flat[marker].pop('known') + flat[marker].pop('new')
        # 3. Store in a new dictionary using the allele as key
        flat[marker] = {allele.pop('allele'): allele for allele in alleles}

    return flat