def find(self, s):
pSet   = [s]<EOL>parent = self._leader[s]<EOL>while parent != self._leader[parent]:<EOL><INDENT>pSet.append(parent)<EOL>parent = self._leader[parent]<EOL><DEDENT>if len(pSet) > <NUM_LIT:1>:<EOL><INDENT>for a in pSet:<EOL><INDENT>self._leader[a] = parent<EOL><DEDENT><DEDENT>return parent<EOL>
Locates the leader of the set to which the element ``s`` belongs.

        Parameters
        ----------
        s : object
            An object that the ``UnionFind`` contains.

        Returns
        -------
        object
            The leader of the set that contains ``s``.