from typing import List
from typing import Tuple


def get_finalization_time(
    final_transcript: List[str], j: int, partial_transcripts: List[Tuple[float, str]]
):
    """
    Return the first time such that tokens up to and including index j of
    the transcript are the same for all following transcripts.
    """
    prefix = final_transcript[: j + 1]
    previous_time = 0
    partial_time = 0

    for partial_time, partial_transcript in reversed(partial_transcripts):
        if partial_transcript[: j + 1] != prefix:
            return previous_time
        previous_time = partial_time

    return partial_time