def METHOD_NAME(
    n_folds: int,
    train_size: float = 0.7,
    val_size: float = 0.2,
    test_size: float = 0.1,
    seed=42,
):
    assert isclose(
        train_size + val_size + test_size, 1.0
    ), "sizes need to add up to 1"
    random_state = np.random.RandomState(seed)
    folds = []
    for _ in range(n_folds):
        train_split, test_split = train_test_split(
            DATASETS_FILTERED,
            train_size=train_size,
            random_state=random_state.randint(low=0, high=10000),
        )
        rest = 1 - train_size
        val_split, test_split = train_test_split(
            test_split,
            test_size=test_size / rest,
            random_state=random_state.randint(low=0, high=10000),
        )
        folds.append((train_split, val_split, test_split))
        assert not any(
            [
                set(train_split) & (set(val_split)),
                set(train_split) & set(test_split),
                set(val_split) & set(test_split),
            ]
        ), "Splits should not intersect!"
    return folds