Write a function that checks if a given binary search tree contains a given value.
Im taking this little test on a website and its telling me that i passed the first test case but not the other two this is what i got class BinarySearchTree: Node = collections.namedtuple('Node', ['left', 'right', 'value']) @staticmethod def contains(root, value): if root.value == None: return False if root.value == value: return True elif root.value > value: return root.left.value == value return root.right.value == value n0 = BinarySearchTree.Node(value=0, left = None, right=None) n1 = BinarySearchTree.Node(value=1, left=n0, right=None) n3 = BinarySearchTree.Node(value=3, left=None, right=None) n2 = BinarySearchTree.Node(value=2, left=n1, right=n3) print(BinarySearchTree.contains(n2, 3)) OUTPUT: True