def _earliest_run_start(
        prev1_start, prev1_haplo, curr1_haplo,
        prev2_start, prev2_haplo, curr2_haplo):
    """
    find the earliest "prev start" such that the "prev" and "curr" haplos match
    """

    earliest_start = None
    if prev1_haplo == curr1_haplo:
        earliest_start = prev1_start

    if prev2_haplo == curr2_haplo:
        if earliest_start is None or prev2_start < prev1_start:
            earliest_start = prev2_start

    return earliest_start