@classmethod
def splits(cls, datasets, batch_sizes=None, **kwargs):
    """Create Iterator objects for multiple splits of a dataset.

        Arguments:
            datasets: Tuple of Dataset objects corresponding to the splits. The
                first such object should be the train set.
            batch_sizes: Tuple of batch sizes to use for the different splits,
                or None to use the same batch_size for all splits.
            Remaining keyword arguments: Passed to the constructor of the
                iterator class being used.
        """
    if batch_sizes is None:
        batch_sizes = [kwargs.pop('batch_size')] * len(datasets)
    ret = []
    for i in range(len(datasets)):
        train = i == 0
        ret.append(cls(datasets[i], batch_size=batch_sizes[i], train=train,
            **kwargs))
    return tuple(ret)
