code: def _getMostActiveCells(self):
      
      poolingActivation = self._poolingActivation
      nonZeroCells = numpy.argwhere(poolingActivation > 0)[:,0]
  
      # include a tie-breaker before sorting
      poolingActivationSubset = poolingActivation[nonZeroCells] + \
                                self._poolingActivation_tieBreaker[nonZeroCells]
      potentialUnionSDR = nonZeroCells[numpy.argsort(poolingActivationSubset)[::-1]]
  
      topCells = potentialUnionSDR[0: self._maxUnionCells]
  
      if max(self._poolingTimer) > self._minHistory:
        self._unionSDR = numpy.sort(topCells).astype(UINT_DTYPE)
      else:
        self._unionSDR = []
  
      return self._unionSDR
docs: Gets the most active cells in the Union SDR having at least non-zero
      activation in sorted order.
      @return: a list of cell indices