code: def getSegmentActivityLevel(self, seg, activeState, connectedSynapsesOnly =False):
      
  
      # todo: Computing in C, use function getSegmentActivityLevel
      return getSegmentActivityLevel(seg.syns, activeState, connectedSynapsesOnly,
                                     self.connectedPerm)
docs: This routine computes the activity level of a segment given activeState.
      It can tally up only connected synapses (permanence >= connectedPerm), or
      all the synapses of the segment, at either t or t-1.