class_docstr: A ``DatasetReader`` knows how to turn a file containing a dataset into a collection
  of ``Instance`` s.  To implement your own, just override the `_read(file_path)` method
  to return an ``Iterable`` of the instances. This could be a list containing the instances
  or a lazy generator that returns them one at a time.
  
  All parameters necessary to _read the data apart from the filepath should be passed
  to the constructor of the ``DatasetReader``.
  
  Parameters
  ----------
  lazy : ``bool``, optional (default=False)
      If this is true, ``instances()`` will return an object whose ``__iter__`` method
      reloads the dataset each time it's called. Otherwise, ``instances()`` returns a list.
class_docstr_tok: ["A","``","DatasetReader","``","knows","how","to","turn","a","file","containing","a","dataset","into","a","collection","of","``","Instance","``","s.","To","implement","your","own",",","just","override","the","`","_read","(","file_path",")","`","method","to","return","an","``","Iterable","``","of","the","instances",".","This","could","be","a","list","containing","the","instances","or","a","lazy","generator","that","returns","them","one","at","a","time",".","All","parameters","necessary","to","_read","the","data","apart","from","the","filepath","should","be","passed","to","the","constructor","of","the","``","DatasetReader","``",".","Parameters","--","--","--","--","--","lazy",":","``","bool","``",",","optional","(","default=False",")","If","this","is","true",",","``","instances","(",")","``","will","return","an","object","whose","``","__iter__","``","method","reloads","the","dataset","each","time","it","'s","called",".","Otherwise",",","``","instances","(",")","``","returns","a","list","."]
docstr: Reads the instances from the given file_path and returns them as an
  `Iterable` (which could be a list or could be a generator).
  You are strongly encouraged to use a generator, so that users can
  read a dataset in a lazy way, if they so choose.
docstr_tok: ["Reads","the","instances","from","the","given","file_path","and","returns","them","as","an","`","Iterable","`","(","which","could","be","a","list","or","could","be","a","generator",")",".","You","are","strongly","encouraged","to","use","a","generator",",","so","that","users","can","read","a","dataset","in","a","lazy","way",",","if","they","so","choose","."]
code: def _read(self, file_path):
      """
      Reads the instances from the given file_path and returns them as an
      `Iterable` (which could be a list or could be a generator).
      You are strongly encouraged to use a generator, so that users can
      read a dataset in a lazy way, if they so choose.
      """
      raise NotImplementedError
  
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 3 for calling the DatasetReader obj's underlying member method code with example usage: obj._read(file_path) without return types