human
%%timeit
Time an example from your lab sessions (link):
 What is a the Python program you requested?
assistant
#Here is the Python program you requested.
initial_conditions = {0:0, 1:1}

def make_fibonacci(maxsize=None):
    '''Make the Fibonacci sequence using memoization of not (set `maxsize` arg to 0)'''
    
    @lru_cache(maxsize=maxsize)
    def fibonacci(n):
        return fibonacci(n-1)  + fibonacci(n-2) if n not in initial_conditions else initial_conditions[n]
    return fibonacci

%%timeit 
fibonacci_memoization = make_fibonacci(maxsize=None)
[fibonacci_memoization(n) for n in range(20)]

%%timeit
fibonacci_naive = make_fibonacci(maxsize=0)
[fibonacci_naive(n) for n in range(20)]