Convenience method to summarize the evidence for each of the alleles
        present at a locus. Applies a score function to the PileupCollection
        associated with each allele.

        See also `PileupCollection.group_by_allele`.

        Parameters
        ----------
        locus : Locus
            The reference locus, encompassing 0 or more bases.

        score (optional) : PileupCollection -> object
            Function to apply to summarize the evidence for each allele.
            Default: count number of reads.

        Returns
        ----------
        List of (allele, score) pairs.

def allele_summary(self, locus, score=lambda x: x.num_reads()):
        '''
        Convenience method to summarize the evidence for each of the alleles
        present at a locus. Applies a score function to the PileupCollection
        associated with each allele.

        See also `PileupCollection.group_by_allele`.

        Parameters
        ----------
        locus : Locus
            The reference locus, encompassing 0 or more bases.

        score (optional) : PileupCollection -> object
            Function to apply to summarize the evidence for each allele.
            Default: count number of reads.

        Returns
        ----------
        List of (allele, score) pairs.
        '''
        locus = to_locus(locus)
        return [
            (allele, score(x))
            for (allele, x) in self.group_by_allele(locus).items()
        ]