code: def printSegmentForCell(tm, cell):
    
    print "Segments for cell", cell, ":"
    for seg in tm.basalConnections._cells[cell]._segments:
      print "    ",
      synapses = seg._synapses
      for s in synapses:
        print "%d:%g" %(s.presynapticCell,s.permanence),
      print
docs: Print segment information for this cell