def f(n): return n * 2 if bar(n) else n + 1 def bar(n_new): return n_new