Name scope for memoization Fibonacci
fib works by recursively calling the function named fib:

def fib(n):
    if n==0:
        return 0
    elif n==1:
        return 1
    else:
        return fib(n-1) + fib(n-2)


In your "execution 1" the function named fib is the memoized version of the function, because you have assigned it like this:

fib = memorize(fib)


But (assuming that you haven't run "execution 1" yet), in your "execution 2" the function named fib is the original function (not the memoized version of the function, which you have assigned to memo_fib), so when you call memo_fib it calls the original fib and when that recurses it calls the original fib, bypassing the memoization.