code: def union(a, b):
      
      a = find(a)
      b = find(b)
      if a is not b:
          if a.rank < b.rank:
              a.parent = b
          elif b.rank < a.rank:
              b.parent = a
          else:
              b.parent = a
              a.rank += 1
docs: Assert equality of two nodes a and b so find(a) is find(b).