def optimization_func(info, pattern, node):
    info['c'] += 1
    if isinstance(pattern.replacement, collections.Callable):
        return pattern.replacement(node)
    else:
        return pattern.replacement
Invoked to count an applied optimization and to replace
dataset/ETHPy150Open armon/pypred/pypred/optimizer.py/optimization_func