input: Write a python function to insert, search, and delete nodes in a binary search tree.
  assert bst.search(10) == True
  assert bst.search(15) == False
  bst.delete(10)
  assert bst.search(10) == False
output: class TreeNode:
      def __init__(self, key):
          self.left = None
          self.right = None
          self.val = key
  
  class BinarySearchTree:
      def __init__(self):
          self.root = None
  
      def insert(self, key):
          if self.root is None:
              self.root = TreeNode(key)
          else:
              self._insert(self.root, key)
  
      def _insert(self, node, key):
          if key < node.val:
              if node.left is None:
                  node.left = TreeNode(key)
              else:
                  self._insert(node.left, key)
          else:
              if node.right is None:
                  node.right = TreeNode(key)
              else:
                  self._insert(node.right, key)
  
      def search(self, key):
          return self._search(self.root, key)
  
      def _search(self, node, key):
          if node is None:
              return False
          if node.val == key:
              return True
          elif key < node.val:
              return self._search(node.left, key)
          else:
              return self._search(node.right, key)
  
      def delete(self, key):
          self.root = self._delete(self.root, key)
  
      def _delete(self, node, key):
          if node is None:
              return node
  
          if key < node.val:
              node.left = self._delete(node.left, key)
          elif key > node.val:
              node.right = self._delete(node.right, key)
          else:
              if node.left is None:
                  return node.right
              elif node.right is None:
                  return node.left
  
              temp = self._minValueNode(node.right)
              node.val = temp.val
              node.right = self._delete(node.right, temp.val)
  
          return node
  
      def _minValueNode(self, node):
          current = node
          while current.left is not None:
              current = current.left
          return current
  
  bst = BinarySearchTree()
  bst.insert(10)
  bst.insert(5)
  bst.insert(20)
  assert bst.search(10) == True
  assert bst.search(15) == False
  bst.delete(10)
  assert bst.search(10) == False