def connectedSet2(self, nodes):
        uf = UnionFind()
        for node in nodes:
            uf.add(node.label)
            for nei in node.neighbors:
                uf.add(nei.label)
                uf.union(node.label, nei.label)

        uf.compress()
        ret = defaultdict(list)
        for item, pi in uf.pi.items():
            ret[pi].append(item)

        for v in ret.values():
            v.sort()

        return ret.values()
test to make sure uint16 type numpy scalars are accepted
dataset/ETHPy150Open algorhythms/LintCode/Find the Weak Connected Component in the Directed Graph.py/Solution.connectedSet2--crossover with--dataset/ETHPy150Open NeuralEnsemble/python-neo/neo/test/coretest/test_base.py/TestBaseNeoNumpyScalarTypes.test_numpy_scalar_uint16