<doocs>0426.Convert Binary Search Tree to Sorted Doubly Linked List_1.py
def dfs(root):
    if root is None:
        return
    nonlocal prev, head
    dfs(root.left)
    if prev:
        prev.right = root
        root.left = prev
    else:
        head = root
    prev = root
    dfs(root.right)
def sample_funcname ( var_1 ) :
    if var_1 is None :
        return
    nonlocal var_3 , var_4
    var_0 ( var_1.left )
    if var_3 :
        var_3.right = var_1
        var_1.left = var_3
    else :
        var_4 = var_1
    var_3 = var_1
    var_0 ( var_1.right )
