code: def union(self, x, y):
          
          repr_x = self.find(x)
          repr_y = self.find(y)
          if repr_x == repr_y:       # already in the same component
              return False
          if self.rank[repr_x] == self.rank[repr_y]:
              self.rank[repr_x] += 1
              self.up[repr_y] = repr_x
          elif self.rank[repr_x] > self.rank[repr_y]:
              self.up[repr_y] = repr_x
          else:
              self.up[repr_x] = repr_y
          return True
docs: Merges part that contain x and part containing y
  
          :returns: False if x, y are already in same part
          :complexity: O(inverse_ackerman(n))