class_docstr: Defines a batch of examples along with its Fields.
  
  Attributes:
      batch_size: Number of examples in the batch.
      dataset: A reference to the dataset object the examples come from
          (which itself contains the dataset's Field objects).
      train: Whether the batch is from a training set.
  
  Also stores the Variable for each column in the batch as an attribute.
docstr: Create a Batch directly from a number of Variables.
docstr_tok: ["Create","a","Batch","directly","from","a","number","of","Variables","."]
code: def fromvars(cls, dataset, batch_size, train=True, **kwargs):
      """Create a Batch directly from a number of Variables."""
      batch = cls()
      batch.batch_size = batch_size
      batch.dataset = dataset
      batch.train = train
      for k, v in kwargs.items():
          setattr(batch, k, v)
      return batch
  
imports: from collections import defaultdict
  from torch.autograd import Variable
  from copy import deepcopy
label_desc: Use image node_id 2 for calling the Batch obj's underlying member method code with example usage: obj.fromvars(cls, dataset, batch_size, train) and returns: batch