parameters: (self, *objects)
docstring: Find the sets containing the objects and merge them all.
docstring_summary: Find the sets containing the objects and merge them all.
docstring_tokens: Find the sets containing the objects and merge them all .
function: def union(self, *objects):
          """Find the sets containing the objects and merge them all."""
          roots = [self[x] for x in objects]
          heaviest = max((self.weights[r], r) for r in roots)[1]
          for r in roots:
              if r != heaviest:
                  self.weights[heaviest] += self.weights[r]
                  self.parents[r] = heaviest
function_tokens: def union ( self , * objects ) : roots = [ self [ x ] for x in objects ] heaviest = max ( ( self . weights [ r ] , r ) for r in roots ) [ 1 ] for r in roots : if r != heaviest : self . weights [ heaviest ] += self . weights [ r ] self . parents [ r ] = heaviest