def METHOD_NAME(examples):
    # 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, though you could add padding instead if the model supports it
    # In this, as in all things, we advise you to follow your heart 🫀
    total_length = (total_length // args.max_length) * args.max_length
    # Split by chunks of max_len.
    result = {
        k: [t[i : i + args.max_length] for i in range(0, total_length, args.max_length)]
        for k, t in concatenated_examples.items()
    }
    return result