code: def anchorCompute(self, anchorInput, learn):
      
      if learn:
        self._anchorComputeLearningMode(anchorInput)
      else:
        overlaps = self.anchorConnections.computeActivity(
          anchorInput, self.connectedPermanence)
  
        self.activeSegments = np.where(overlaps >= self.activationThreshold)[0]
        self.activeCells = np.unique(
          self.anchorConnections.mapSegmentsToCells(self.activeSegments))
docs: Compute the
        "sensor's location relative to a specific object"
      from the feature-location pair.
  
      @param anchorInput (numpy array)
      Active cells in the feature-location pair layer
  
      @param learn (bool)
      If true, maintain current cell activity and learn this input on the
      currently active cells