code: def compute(self, feedforwardInput=(), lateralInputs=(),
                feedforwardGrowthCandidates=None, learn=True,
                predictedInput = None,):
      
  
      if feedforwardGrowthCandidates is None:
        feedforwardGrowthCandidates = feedforwardInput
  
      # inference step
      if not learn:
        self._computeInferenceMode(feedforwardInput, lateralInputs)
  
      # learning step
      elif not self.onlineLearning:
        self._computeLearningMode(feedforwardInput, lateralInputs,
                                  feedforwardGrowthCandidates)
      # online learning step
      else:
        if (predictedInput is not None and
            len(predictedInput) > self.predictedInhibitionThreshold):
          predictedActiveInput = numpy.intersect1d(feedforwardInput,
                                                   predictedInput)
          predictedGrowthCandidates = numpy.intersect1d(
              feedforwardGrowthCandidates, predictedInput)
          self._computeInferenceMode(predictedActiveInput, lateralInputs)
          self._computeLearningMode(predictedActiveInput, lateralInputs,
                                    feedforwardGrowthCandidates)
        elif not self.minSdrSize <= len(self.activeCells) <= self.maxSdrSize:
          # If the pooler doesn't have a single representation, try to infer one,
          # before actually attempting to learn.
          self._computeInferenceMode(feedforwardInput, lateralInputs)
          self._computeLearningMode(feedforwardInput, lateralInputs,
                                    feedforwardGrowthCandidates)
        else:
          # If there isn't predicted input and we have a single SDR,
          # we are extending that representation and should just learn.
          self._computeLearningMode(feedforwardInput, lateralInputs,
                                    feedforwardGrowthCandidates)
docs: Runs one time step of the column pooler algorithm.
  
      @param  feedforwardInput (sequence)
              Sorted indices of active feedforward input bits
  
      @param  lateralInputs (list of sequences)
              For each lateral layer, a list of sorted indices of active lateral
              input bits
  
      @param  feedforwardGrowthCandidates (sequence or None)
              Sorted indices of feedforward input bits that active cells may grow
              new synapses to. If None, the entire feedforwardInput is used.
  
      @param  learn (bool)
              If True, we are learning a new object
  
      @param predictedInput (sequence)
             Sorted indices of predicted cells in the TM layer.