def recreate_sequences(list_tokens_tags: list):
    """
    From a list of tuples (token, tag) where tag != "O", recreate a list of lists where each inner list is a
    tagged sequence
    :param list_tokens_tags: List of tuples [(token1, tag1), (token2, tag2), ...]
    :return:
    """
    sequence = []
    final_sequences = []
    for token, tag in list_tokens_tags:
        if "I" in tag:
            sequence.append((token, tag))
        if "B" in tag:
            if sequence:
                final_sequences.append(sequence)

            sequence = [(token, tag)]
            # inside_sequence = True
        # else:
        # inside_sequence = True
        # sequence.append((token, tag))
    final_sequences.append(sequence)
    return final_sequences

    pass