def get_two_mismatches_dist(mm_positions):
    """ Given mismatch positions outputted from get_two_mismatches_loc(), label type of mismatch

        :param mm_positions: ooutput from get_two_mismatches_loc()
        :return: 'null' if no mismatches or > two mismatches
                 'dist' if 1-2 mismatches, all PAM-distal (positions 12-20)
                 'prox' if 1-2 mismatches, all PAM-proximal (positions 1-11)
                 'mix' if 2 mismatches, one PAM-proximal, one PAM-distal
    """
    if mm_positions[0] == -1 and mm_positions[1] == -1:        # neither 1 nor 2 mismatches
        return 'null'
    elif mm_positions[1] == -1:                            # 1 mismatch
        if mm_positions[0] >= 12:
            return 'dist'
        elif 0 <= mm_positions[0] < 12:
            return 'prox'
        else:
            return ValueError("Error")
    else:                                                   # 2 mismatches
        if mm_positions[0] >= 12 and mm_positions[1] >= 12:
            return 'dist'
        elif 0 <= mm_positions[0] < 12 and 0 <= mm_positions[1] < 12:
            return 'prox'
        else:
            return 'mix'