def union(self, a, b):
s1, s2 = self.find(a), self.find(b)<EOL>if s1 != s2:<EOL><INDENT>r1, r2  = self._rank[s1], self._rank[s2]<EOL>if r2 > r1:<EOL><INDENT>r1, r2 = r2, r1<EOL>s1, s2 = s2, s1<EOL><DEDENT>if r1 == r2:<EOL><INDENT>self._rank[s1] += <NUM_LIT:1><EOL><DEDENT>self._leader[s2] = s1<EOL>self._size[s1]  += self._size[s2]<EOL>self.nClusters  -= <NUM_LIT:1><EOL><DEDENT>
Merges the set that contains ``a`` with the set that contains ``b``.

        Parameters
        ----------
        a, b : objects
            Two objects whose sets are to be merged.