class_docstr: An ``Iterable`` that just wraps a thunk for generating instances and calls it for
  each call to ``__iter__``.
class_docstr_tok: ["An","``","Iterable","``","that","just","wraps","a","thunk","for","generating","instances","and","calls","it","for","each","call","to","``","__iter__","``","."]
code: def __iter__(self):
      instances = self.instance_generator()
      if isinstance(instances, list):
          raise ConfigurationError(
              "For a lazy dataset reader, _read() must return a generator"
          )
      return instances
  
file_path: magnitude/pymagnitude/third_party/allennlp/data/dataset_readers/dataset_reader.py
imports: from __future__ import absolute_import
  import logging
  from allennlp.data.instance import Instance
  from allennlp.common import Tqdm
  from allennlp.common.checks import ConfigurationError
  from allennlp.common.registrable import Registrable
label_desc: Use image node_id 2 for calling the _LazyInstances obj's underlying member method code with example usage: obj.__iter__() and returns: instances