Renamed fill_partition() to build_partition() and made it return a list of interconnected nodes.