parameters: (self, root)
return_statement: return root
docstring: :type root: TreeNode
          :rtype: TreeNode
docstring_summary: :type root: TreeNode
          :rtype: TreeNode
docstring_tokens: : type root : TreeNode : rtype : TreeNode
function: def convertBST(self, root):
          """
          :type root: TreeNode
          :rtype: TreeNode
          """
          def dfs(node):
              if node == None:
                  return
              else:
                  dfs(node.right)
                  node.val += dfs.total
                  dfs.total = node.val
                  dfs(node.left)
  
          dfs.total = 0
          dfs(root)
          return root
function_tokens: def convertBST ( self , root ) : def dfs ( node ) : if node == None : return else : dfs ( node . right ) node . val += dfs . total dfs . total = node . val dfs ( node . left ) dfs . total = 0 dfs ( root ) return root