def get_near_items(tree, tree_key):
try:<EOL><INDENT>yield tree.floor_item(tree_key)<EOL><DEDENT>except KeyError:<EOL><INDENT>pass<EOL><DEDENT>try:<EOL><INDENT>yield tree.ceiling_item(tree_key)<EOL><DEDENT>except KeyError:<EOL><INDENT>pass<EOL><DEDENT>
Check both possible neighbors for key
in a binary tree