code: def computeActivity(self, activeInputsBySource, permanenceThreshold=None):
      
      overlaps = None
  
      for source, connections in self.connectionsBySource.iteritems():
        o = connections.computeActivity(activeInputsBySource[source],
                                        permanenceThreshold)
        if overlaps is None:
          overlaps = o
        else:
          overlaps += o
  
      return overlaps
docs: Calculate the number of active synapses per segment.
  
      @param activeInputsBySource (dict)
      The active cells in each source. Example:
        {"customInputName1": np.array([42, 69])}