def yaml(self):
        return yaml.dump(self.serialized, default_flow_style=False,
                         encoding=None)
def insert(root, key):
    left, right = split(root, key)
    return merge(merge(left, Treap(key)), right)