code: def _updateInferenceStats(self, statistics, objectName=None):
      
      L4Representations = self.getL4Representations()
      L4PredictedCells = self.getL4PredictedCells()
      L4PredictedActiveCells = self.getL4PredictedActiveCells()
      L2Representation = self.getL2Representations()
  
      for i in xrange(self.numColumns):
        statistics["L4 Representation C" + str(i)].append(
          len(L4Representations[i])
        )
        statistics["L4 Predicted C" + str(i)].append(
          len(L4PredictedCells[i])
        )
        statistics["L4 PredictedActive C" + str(i)].append(
          len(L4PredictedActiveCells[i])
        )
        statistics["L2 Representation C" + str(i)].append(
          len(L2Representation[i])
        )
        statistics["L4 Apical Segments C" + str(i)].append(
          len(self.L4Columns[i]._tm.getActiveApicalSegments())
        )
        statistics["L4 Basal Segments C" + str(i)].append(
          len(self.L4Columns[i]._tm.getActiveBasalSegments())
        )
  
        # add true overlap if objectName was provided
        if objectName in self.objectL2Representations:
          objectRepresentation = self.objectL2Representations[objectName]
          statistics["Overlap L2 with object C" + str(i)].append(
            len(objectRepresentation[i] & L2Representation[i])
          )
docs: Updates the inference statistics.
  
      Parameters:
      ----------------------------
      @param  statistics (dict)
              Dictionary in which to write the statistics
  
      @param  objectName (str)
              Name of the inferred object, if known. Otherwise, set to None.