after a long fight: UnionFind is exposed to python