def warning(message, **kwargs):
    kwargs["fg"] = kwargs.get("fg", "red")
    click.secho(u"warning: {}".format(message), **kwargs)
def kth(root, k):
    if k < size(root.left):
        return kth(root.left, k)
    elif k > size(root.left):
        return kth(root.right, k - size(root.left) - 1)
    return root.key