class_docstr: A batch of Instances. In addition to containing the instances themselves,
  it contains helper functions for converting the data into tensors.
  
  A Batch just takes an iterable of instances in its constructor and hangs onto them
  in a list.
class_docstr_tok: ["A","batch","of","Instances",".","In","addition","to","containing","the","instances","themselves",",","it","contains","helper","functions","for","converting","the","data","into","tensors",".","A","Batch","just","takes","an","iterable","of","instances","in","its","constructor","and","hangs","onto","them","in","a","list","."]
code: def __len__(self):
      return len(self.instances)
  
file_path: allennlp/allennlp/data/batch.py
imports: import logging
  from collections import defaultdict, Counter
  from typing import Dict, Iterable, Iterator, List, Union
  import numpy
  import torch
  from allennlp.common.checks import ConfigurationError
  from allennlp.common.util import ensure_list
  from allennlp.data.instance import Instance
  from allennlp.data.vocabulary import Vocabulary
label_desc: Use image node_id 8 for calling the Batch obj's underlying member method code with example usage: obj.__len__() and returns: len