def second_pass_duration(interest_area, fixation_sequence):
    """
    Given an interest area and fixation sequence, return the second pass
    duration on that interest area. Second pass duration is the sum duration
    of all fixations inside an interest area during the second pass over that
    interest area.
    """
    duration = 0
    current_pass = None
    next_pass = 1
    for fixation in fixation_sequence.iter_without_discards():
        if fixation in interest_area:
            if current_pass is None:  # first fixation in a new pass
                current_pass = next_pass
            if current_pass == 2:
                duration += fixation.duration
        elif current_pass == 1:  # first fixation to exit the first pass
            current_pass = None
            next_pass += 1
        elif current_pass == 2:  # first fixation to exit the second pass
            break
    return duration