def get_finalization_time(final_transcript, j, partial_transcripts):
    """
    Return the first time such that the first j tokens of the transcript
    are the same for all following transcripts.
    """
    prefix = final_transcript[:j]
    partial_time = 0

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

    return partial_time