def METHOD_NAME(self):
    """Test that (K-1) folds can be merged into train dataset."""
    n_samples = 100
    n_features = 10
    n_tasks = 10
    X = np.random.rand(n_samples, n_features)
    p = .05  # proportion actives
    y = np.random.binomial(1, p, size=(n_samples, n_tasks))
    w = np.ones((n_samples, n_tasks))
    dataset = dc.data.NumpyDataset(X, y, w)
    K = 5
    task_splitter = dc.splits.TaskSplitter()
    fold_datasets = task_splitter.k_fold_split(dataset, K)
    # Number tasks per fold
    n_per_fold = 2
    for fold in range(K):
        train_inds = list(set(range(K)) - set([fold]))
        train_fold_datasets = [fold_datasets[ind] for ind in train_inds]
        train_dataset = dc.splits.merge_fold_datasets(train_fold_datasets)
        # Find the tasks that correspond to this test fold
        train_tasks = list(
            set(range(10)) -
            set(range(fold * n_per_fold, (fold + 1) * n_per_fold)))
        # Assert that all arrays look like they should
        np.testing.assert_array_equal(train_dataset.X, X)
        np.testing.assert_array_equal(train_dataset.y, y[:, train_tasks])
        np.testing.assert_array_equal(train_dataset.w, w[:, train_tasks])
        np.testing.assert_array_equal(train_dataset.X, X)