class_docstr: An `Instance` is a collection of :class:`~allennlp.data.fields.field.Field` objects,
  specifying the inputs and outputs to
  some model.  We don't make a distinction between inputs and outputs here, though - all
  operations are done on all fields, and when we return arrays, we return them as dictionaries
  keyed by field name.  A model can then decide which fields it wants to use as inputs as which
  as outputs.
  
  The `Fields` in an `Instance` can start out either indexed or un-indexed.  During the data
  processing pipeline, all fields will be indexed, after which multiple instances can be combined
  into a `Batch` and then converted into padded arrays.
  
  # Parameters
  
  fields : `Dict[str, Field]`
      The `Field` objects that will be used to produce data arrays for this instance.
class_docstr_tok: ["An","`","Instance","`","is","a","collection","of",":","class",":","`","~allennlp.data.fields.field.Field","`","objects",",","specifying","the","inputs","and","outputs","to","some","model",".","We","do","n't","make","a","distinction","between","inputs","and","outputs","here",",","though","-","all","operations","are","done","on","all","fields",",","and","when","we","return","arrays",",","we","return","them","as","dictionaries","keyed","by","field","name",".","A","model","can","then","decide","which","fields","it","wants","to","use","as","inputs","as","which","as","outputs",".","The","`","Fields","`","in","an","`","Instance","`","can","start","out","either","indexed","or","un-indexed",".","During","the","data","processing","pipeline",",","all","fields","will","be","indexed",",","after","which","multiple","instances","can","be","combined","into","a","`","Batch","`","and","then","converted","into","padded","arrays",".","#","Parameters","fields",":","`","Dict","[","str",",","Field","]","`","The","`","Field","`","objects","that","will","be","used","to","produce","data","arrays","for","this","instance","."]
code: def __iter__(self):
      return iter(self.fields)
  
file_path: allennlp/allennlp/data/instance.py
imports: from typing import Dict, MutableMapping, Mapping
  from allennlp.data.fields.field import DataArray, Field
  from allennlp.data.vocabulary import Vocabulary
  from allennlp.common.util import JsonDict
label_desc: Use image node_id 3 for calling the Instance obj's underlying member method code with example usage: obj.__iter__() and returns: iter