<doocs>0783.Minimum Distance Between BST Nodes_1.py
def dfs(root):
    if root is None:
        return
    dfs(root.left)
    nonlocal ans, prev
    ans = min(ans, abs(prev - root.val))
    prev = root.val
    dfs(root.right)
def sample_funcname ( var_1 ) :
    if var_1 is None :
        return
    var_0 ( var_1.left )
    nonlocal var_4 , var_5
    var_4 = min ( var_4 , abs ( var_5 - var_1.val ) )
    var_5 = var_1.val
    var_0 ( var_1.right )
