How would you approach implementing a standard algorithm, such as Fibonacci, in a production-ready way?
Implement fibonacci(n) using a clear, efficient approach with documented input and output behavior. The function accepts a non-negative integer n and returns the nth Fibonacci number, where F(0) = 0 and F(1) = 1.
def fibonacci(n):