Find the most common nucleotide at each offset to the left and
    right of a variant.

    Parameters
    ----------
    partitioned_read_sequences : list of tuples
        Each tuple has three elements:
            - sequence before mutant nucleotides
            - mutant nucleotides
            - sequence after mutant nucleotides

    Returns a tuple with the following elements:
        - nucleotide sequence from most common nucleotide at each offset
           relative to the variant
        - an array of counts indicating how many reads supported this nucleotide
        - an array of counts for all the *other* nucleotides at that position

def most_common_nucleotides(partitioned_read_sequences):
    """
    Find the most common nucleotide at each offset to the left and
    right of a variant.

    Parameters
    ----------
    partitioned_read_sequences : list of tuples
        Each tuple has three elements:
            - sequence before mutant nucleotides
            - mutant nucleotides
            - sequence after mutant nucleotides

    Returns a tuple with the following elements:
        - nucleotide sequence from most common nucleotide at each offset
           relative to the variant
        - an array of counts indicating how many reads supported this nucleotide
        - an array of counts for all the *other* nucleotides at that position
    """
    counts, variant_column_indices = nucleotide_counts(
        partitioned_read_sequences)
    max_count_per_column = counts.max(axis=0)

    assert len(max_count_per_column) == counts.shape[1]
    max_nucleotide_index_per_column = np.argmax(counts, axis=0)
    assert len(max_nucleotide_index_per_column) == counts.shape[1]
    nucleotides = [
        index_to_dna_nucleotide[idx]
        for idx in max_nucleotide_index_per_column
    ]
    other_nucleotide_counts = counts.sum(axis=0) - max_count_per_column
    return "".join(nucleotides), max_count_per_column, other_nucleotide_counts