Note
This documents the development version of NetworkX. Documentation for the current release can be found here.
UnionFind.
union
Find the sets containing the objects and merge them all.