def save(self, doc):
        if doc.id:
            return self.update(doc)
        else:
            return self.insert(doc)
def dfs_print(root):
        if root is None:
            return
        dfs_print(root.left)
        print(str(root.key) + ' ', end='')
        dfs_print(root.right)