@classmethod
def fromvars(cls, dataset, batch_size, train=None, **kwargs):
    """Create a Batch directly from a number of Variables."""
    batch = cls()
    batch.batch_size = batch_size
    batch.dataset = dataset
    batch.fields = dataset.fields.keys()
    for k, v in kwargs.items():
        setattr(batch, k, v)
    return batch
