def find(node, key):
    """Find a node with a given key within a BST."""
    # For a balanced BST, this func only takes O(log N); otherwise it's O(N)
    if node is None:
        return None
    if key == node.key:
        return node
    if key < node.key:
        return find(node.left, key)
    if key > node.key:
        return find(node.right, key)