Thanks for the very instructive examples of use of mpi4py.
I am actually trying to use mpi4py to gather processes of each node of a cluster [as explained on that StackExchange question]. My first idea was to directly use groups and intercommunications, but this post recommend to use the gather then split functions.
I am referring to you because you have a great experience with MPI using mpi4py and maybe one of your example could be simply adapted to achieve that. Also, It could be an interesting addition to your very good set of examples.