def METHOD_NAME(self,
                           dataset,
                           frac_train=.8,
                           frac_valid=.1,
                           frac_test=.1):
    """Performs a train/valid/test split of the tasks for dataset.
    If split is uneven, spillover goes to test.
    Parameters
    ----------
    dataset: dc.data.Dataset
        Dataset to be split
    frac_train: float, optional
        Proportion of tasks to be put into train. Rounded to nearest int.
    frac_valid: float, optional
        Proportion of tasks to be put into valid. Rounded to nearest int.
    frac_test: float, optional
        Proportion of tasks to be put into test. Rounded to nearest int.
    """
    np.testing.assert_almost_equal(frac_train + frac_valid + frac_test, 1)
    n_tasks = len(dataset.get_task_names())
    n_train = int(np.round(frac_train * n_tasks))
    n_valid = int(np.round(frac_valid * n_tasks))
    X, y, w, ids = dataset.X, dataset.y, dataset.w, dataset.ids
    train_dataset = NumpyDataset(X, y[:, :n_train], w[:, :n_train], ids)
    valid_dataset = NumpyDataset(X, y[:, n_train:n_train + n_valid],
                                 w[:, n_train:n_train + n_valid], ids)
    test_dataset = NumpyDataset(X, y[:, n_train + n_valid:],
                                w[:, n_train + n_valid:], ids)
    return train_dataset, valid_dataset, test_dataset