How would you write a recursive function to get the nth number in the Fibonacci sequence?
Use zero-based indexing: F(0) = 0 and F(1) = 1. Implement fib(n), which accepts a non-negative integer and returns the nth Fibonacci number. Explain the base cases and the time and space complexity of the direct recursive approach.
def fib(n):