code: def compute(self, inputs, outputs):
      
  
      resetSignal = False
      if 'resetIn' in inputs:
        if len(inputs['resetIn']) != 1:
          raise Exception("resetIn has invalid length")
  
        if inputs['resetIn'][0] != 0:
          resetSignal = True
  
      outputs["mostActiveCells"][:] = numpy.zeros(
                                        self._columnCount, dtype=GetNTAReal())
  
      if self._poolerType == "simpleUnion":
        self._pooler.unionIntoArray(inputs["activeCells"],
                                    outputs["mostActiveCells"],
                                    forceOutput = resetSignal)
      else:
        predictedActiveCells = inputs["predictedActiveCells"] if (
          "predictedActiveCells" in inputs) else numpy.zeros(self._inputWidth,
                                                             dtype=uintDType)
  
        mostActiveCellsIndices = self._pooler.compute(inputs["activeCells"],
                                                      predictedActiveCells,
                                                      self.learningMode)
  
        outputs["mostActiveCells"][mostActiveCellsIndices] = 1
  
      if resetSignal:
          self.reset()
docs: Run one iteration of TemporalPoolerRegion's compute.
  
      Note that if the reset signal is True (1) we assume this iteration
      represents the *end* of a sequence. The output will contain the pooled
      representation to this point and any history will then be reset. The output
      at the next compute will start fresh.