def _updatePoolingState(self, activeColWithPredictedInput, fractionUnpredicted):
    """
    This function updates the pooling state of TP cells. A cell will stop
    pooling if:
    (1) It hasn't received any predicted input in the last self._poolingLife
    steps
    or
    (2) the overall fraction of unpredicted input to the TP is above
        _poolingThreshUnpredicted
    """
    if fractionUnpredicted > self._poolingThreshUnpredicted:
      # Reset pooling activation if the fraction of unpredicted input
      # is above the threshold
      if self._spVerbosity > 3:
        print " reset pooling state for all cells"
      self._poolingActivation = numpy.zeros(self._numColumns, dtype="int32")
    else:
      # decrement activation of all pooling cells
      self._poolingActivation[self._poolingColumns] -= 1
      # reset activation of cells that are receiving predicted input
      self._poolingActivation[activeColWithPredictedInput] = self._poolingLife

    self._poolingColumns = self._poolingActivation.nonzero()[0]