I think this is based on the structure of @taynaud  implementation...{node:community}
The version in brains returns a list of sets
(specifically a list of WeightedPartition objects, which have a `communities` attribute, containing the partition as a list of sets.

There is code in brains.utils to move from a list of sets, to a dict of sets (default for unweighted GraphPartition)
This might be useful to reuse?