class_docstr: Two-gram benchmark model.
  
  :param inferenceType: (:class:`nupic.frameworks.opf.opf_utils.InferenceType`)
  :param encoders: a dict of dicts, eventually sent to
         :meth:`~nupic.encoders.multi.MultiEncoder.addMultipleEncoders` (see
         docs of that method for param details).
code: def __init__(
      self,
      inferenceType=InferenceType.TemporalNextStep,
      encoderParams=(),
  ):
      super(TwoGramModel, self).__init__(inferenceType)
  
      self._logger = opf_utils.initLogger(self)
      self._reset = False
      self._hashToValueDict = dict()
      self._learningEnabled = True
      self._encoder = encoders.MultiEncoder(encoderParams)
      self._fieldNames = self._encoder.getScalarNames()
      self._prevValues = [] * len(self._fieldNames)
      self._twoGramDicts = [
          dict() for _ in xrange(len(self._fieldNames))
      ]
  
imports: import collections
  import itertools
  from nupic import encoders
  from nupic.data import field_meta
  from nupic.frameworks.opf import model
  from nupic.frameworks.opf import opf_utils
  from opf_utils import InferenceType
label_desc: Use image node_id 1 to create a new TwoGramModel object from inherited base classes: model with example: obj = TwoGramModel(inferenceType, encoderParams)