<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def infer(self, sensationList, reset=True, objectName=None):
 """ Infer on a given set of sensations for a single object. The provided sensationList is a list of sensations, and each sensation is a mapping from cortical column to a tuple of three SDR's respectively corresponding to the locationInput, the coarseSensorInput, and the sensorInput. For example, the input can look as follows, if we are inferring a simple object with two sensations (with very few active bits for simplicity):
 sensationList = [ { # location, coarse feature, fine feature for CC0, sensation 1 0: ( [1, 5, 10], [9, 32, 75], [6, 12, 52] ), # location, coarse feature, fine feature for CC1, sensation 1 1: ( [6, 2, 15], [11, 42, 92], [7, 11, 50] ), }, { # location, coarse feature, fine feature for CC0, sensation 2 0: ( [2, 9, 10], [10, 35, 78], [6, 12, 52] ), # location, coarse feature, fine feature for CC1, sensation 2 1: ( [1, 4, 12], [10, 32, 52], [6, 10, 52] ), }, ] If the object is known by the caller, an object name can be specified as an optional argument, and must match the objects given while learning. This is used later when evaluating inference statistics. Parameters: @param objects (dict) Objects to learn, in the canonical format specified above @param reset (bool) If set to True (which is the default value), the network will be reset after learning. @param objectName (str) Name of the objects (must match the names given during learning). """

    self._unsetLearningMode()
    statistics = collections.defaultdict(list)

    if objectName is not None:
      if objectName not in self.objectRepresentationsL2:
        raise ValueError("The provided objectName was not given during"
                         " learning")

    for sensations in sensationList:

      # feed all columns with sensations
      for col in xrange(self.numColumns):
        location, coarseFeature, fineFeature = sensations[col]
        self.locationInputs[col].addDataToQueue(list(location), 0, 0)
        self.coarseSensors[col].addDataToQueue(list(coarseFeature), 0, 0)
        self.sensors[col].addDataToQueue(list(fineFeature), 0, 0)
      self.network.run(1)
      self._updateInferenceStats(statistics, objectName)

    if reset:
      # send reset signal
      self._sendReset()

    # save statistics
    statistics["numSteps"] = len(sensationList)
    statistics["object"] = objectName if objectName is not None else "Unknown"
    self.statistics.append(statistics)