code: def createSegments(self, cells):
      
      segments = None
  
      for connections in self.connectionsBySource.itervalues():
        created = connections.createSegments(cells)
  
        if segments is None:
          segments = created
        else:
          # Sanity-check that the segment numbers are the same.
          np.testing.assert_equal(segments, created)
  
      return segments
docs: Create a segment on each of the specified cells.
  
      @param cells (numpy array)