

def optimize(node, max_pass=32, min_change=1):
    '\n    Takes an AST and returns one that is equivilent\n    but optimized.\n    '
    changes = min_change
    passes = 0
    while ((passes < max_pass) and (changes >= min_change)):
        (changes, node) = optimization_pass(node)
        passes += 1
    return node

dataset/ETHPy150Open armon/pypred/pypred/optimizer.py optimize/original