def __internal_union(self, root_a, root_b):
<EOL>update_rank = False<EOL>rank_a = self.__forest[root_a]<EOL>rank_b = self.__forest[root_b]<EOL>if rank_a < rank_b:<EOL><INDENT>larger = root_b<EOL>smaller = root_a<EOL><DEDENT>else:<EOL><INDENT>larger = root_a<EOL>smaller = root_b<EOL>if rank_a == rank_b:<EOL><INDENT>update_rank = True<EOL><DEDENT><DEDENT>self.__forest[smaller] = larger<EOL>if update_rank:<EOL><INDENT>self.__forest[larger] -= <NUM_LIT:1><EOL><DEDENT>
Internal function to join two set trees specified by root_a and root_b.
        Assumes root_a and root_b are distinct.