<doocs>0430.Flatten a Multilevel Doubly Linked List_1.py
def preorder(pre, cur):
    if cur is None:
        return pre
    cur.prev = pre
    pre.next = cur
    
    t = cur.next
    tail = preorder(cur, cur.child)
    cur.child = None
    return preorder(tail, t)
def sample_funcname ( var_1 , var_2 ) :
    if var_2 is None :
        return var_1
    var_2.prev = var_1
    var_1.next = var_2
    var_6 = var_2.next
    var_8 = var_0 ( var_2 , var_2.child )
    var_2.child = None
    return var_0 ( var_8 , var_6 )
