def find(self, value, key):
while self is not NULL:<EOL><INDENT>direction = cmp(key(value), key(self.value))<EOL>if direction < <NUM_LIT:0>:<EOL><INDENT>self = self.left<EOL><DEDENT>elif direction > <NUM_LIT:0>:<EOL><INDENT>self = self.right<EOL><DEDENT>elif direction == <NUM_LIT:0>:<EOL><INDENT>return self.value<EOL><DEDENT><DEDENT>
Find a value in a node, using a key function.