def group_texts(examples: dict, block_size: int) -> dict:
    """Groups texts into blocks of `block_size

    Args:
        examples (dict): A dictionary containing a "text" key and the text value.
        block_size (int): The block size.

    Returns:
        dict: A dict containing input ids, token type ids and attention masks with sizes corresponding to the `block_size`.
    """

    # Concatenate all texts.
    concatenated_examples = {k: sum(examples[k], []) for k in examples.keys()}
    total_length = len(concatenated_examples[list(examples.keys())[0]])

    # We drop the small remainder, we could add padding if the model supported it instead of this drop, you can
    # customize this part to your needs.
    total_length = (total_length // block_size) * block_size

    # Split by chunks of max_len.
    result = {
        k: [t[i : i + block_size] for i in range(0, total_length, block_size)]
        for k, t in concatenated_examples.items()
    }
    result["labels"] = result["input_ids"].copy()
    return result