'Iterates over the sets stored in this structure.
For example::
>>> partition = UnionFind(\'xyz\')
>>> sorted(map(sorted, partition.to_sets()))
[[\'x\'], [\'y\'], [\'z\']]
>>> partition.union(\'x\', \'y\')
>>> sorted(map(sorted, partition.to_sets()))
[[\'x\', \'y\'], [\'z\']]'

def to_sets(self):

    for block in groups(self.parents).values():
        (yield block)
