from typing import List
from typing import Any
from typing import Tuple
import random


def split_data(data: List[Any],
               sizes: Tuple[float, float, float] = (0.8, 0.1, 0.1),
               seed: int = 0) -> Tuple[List[Any], List[Any], List[Any]]:
    """
    Randomly splits data into train, val, and test sets according to the provided sizes.

    :param data: The data to split into train, val, and test.
    :param sizes: The sizes of the train, val, and test sets (as a proportion of total size).
    :param seed: Random seed.
    :return: Train, val, and test sets.
    """
    # Checks
    assert len(sizes) == 3
    assert all(0 <= size <= 1 for size in sizes)
    assert sum(sizes) == 1

    # Shuffle
    random.seed(seed)
    random.shuffle(data)

    # Determine split sizes
    train_size = int(sizes[0] * len(data))
    train_val_size = int((sizes[0] + sizes[1]) * len(data))

    # Split
    train = data[:train_size]
    val = data[train_size:train_val_size]
    test = data[train_val_size:]

    return train, val, test