<doocs>0364.Nested List Weight Sum II_1.py
def dfs(nestedList, max_depth):
    depth_sum = 0
    for item in nestedList:
        if item.isInteger():
            depth_sum += item.getInteger() * max_depth
        else:
            depth_sum += dfs(item.getList(), max_depth - 1)
    return depth_sum
def sample_funcname ( var_1 , var_2 ) :
    var_4 = 0
    for var_5 in var_1 :
        if var_5.isInteger ( ) :
            var_4 += var_5.getInteger ( ) * var_2
        else :
            var_4 += var_0 ( var_5.getList ( ) , var_2 - 1 )
    return var_4
