

import functools
from math import sqrt
from time import time

def 	lowerCamelCase__	(   _a							,     *_a							,     **_a):
	SCREAMING_SNAKE_CASE				: Dict			       =    time()
	SCREAMING_SNAKE_CASE				: Any			       =    func(*_a							,     **_a)
	SCREAMING_SNAKE_CASE				: int			       =    time()
	if int(end - start) > 0:
		print(f"{func.__name__} runtime: {(end - start):0.4f} s")
	else:
		print(f"{func.__name__} runtime: {(end - start) * 1000:0.4f} ms")
	return output

def 	lowerCamelCase__	(   _a):
	if n < 0:
		raise Exception("n is negative")
	if n == 0:
		return [0]
	SCREAMING_SNAKE_CASE				: List[Any]			       =    [0, 1]
	for _ in range(n - 1):
		fib.append(fib[-1] + fib[-2])
	return fib

def 	lowerCamelCase__	(   _a):

	def fib_recursive_term(_a) -> int:
		if i < 0:
			raise Exception("n is negative")
		if i < 2:
			return i
		return fib_recursive_term(i - 1) + fib_recursive_term(i - 2)

	if n < 0:
		raise Exception("n is negative")
	return [fib_recursive_term(_a) for i in range(n + 1)]

def 	lowerCamelCase__	(   _a):

	@functools.cache
	def fib_recursive_term(_a) -> int:
		if i < 0:
			raise Exception("n is negative")
		if i < 2:
			return i
		return fib_recursive_term(i - 1) + fib_recursive_term(i - 2)

	if n < 0:
		raise Exception("n is negative")
	return [fib_recursive_term(_a) for i in range(n + 1)]

def 	lowerCamelCase__	(   _a):
	if n < 0:
		raise Exception("n is negative")
	# Cache must be outside recursuive function
	# other it will reset every time it calls itself.
	SCREAMING_SNAKE_CASE				: dict[int, int]			       =    {0: 0, 1: 1, 2: 1}  # Prefilled cache

	def rec_fn_memoized(_a) -> int:
		if num in cache:
			return cache[num]

		SCREAMING_SNAKE_CASE				: List[str]			       =    rec_fn_memoized(num - 1) + rec_fn_memoized(num - 2)
		SCREAMING_SNAKE_CASE				: Optional[int]			       =    value
		return value

	return [rec_fn_memoized(_a) for i in range(n + 1)]

def 	lowerCamelCase__	(   _a):
	if n < 0:
		raise Exception("n is negative")
	if n >= 1475:
		raise Exception("n is too large")
	SCREAMING_SNAKE_CASE				: Union[str, Any]			       =    sqrt(5)
	SCREAMING_SNAKE_CASE				: Optional[int]			       =    (1 + sqrt_a) / 2
	return [round(phi**i / sqrt_a) for i in range(n + 1)]


if __name__ == "__main__":
			a_         =      30
			time_func(fib_iterative, num)
			time_func(fib_recursive, num)  # Around 3s runtime
			time_func(fib_recursive_cached, num)  # Around 0ms runtime
			time_func(fib_memoization, num)
			time_func(fib_binet, num)


import re

def 	lowerCamelCase__	(   _a):
	def docstring_decorator(_a):
		SCREAMING_SNAKE_CASE				: List[Any]			       =    fn.__doc__
		SCREAMING_SNAKE_CASE				: List[str]			       =    func_doc.split("\n")
		SCREAMING_SNAKE_CASE				: Dict			       =    0
		while i < len(_a) and re.search(r"^\s*Examples?:\s*$"							,     lines[i]) is None:
			i += 1
		if i < len(_a):
			SCREAMING_SNAKE_CASE				: Tuple			       =    example_docstring
			SCREAMING_SNAKE_CASE				: List[Any]			       =    "\n".join(_a)
		else:
			raise ValueError(
			    f"The function {fn} should have an empty 'Examples:' in its docstring as placeholder, "
			    f"current docstring is:\n{func_doc}")
		SCREAMING_SNAKE_CASE				: Optional[int]			       =    func_doc
		return fn

	return docstring_decorator