human
I wrote the below code

    def backoff_gen():
        for retry in range(0, retries):
            sleep = (delay * (backoff ** retry))
            (yield (sleep if (max_delay is None) else min(sleep, max_delay)))
    return backoff_gen

What's a good function header?
assistant
#Here's a good function header.

def _exponential_backoff(retries=10, delay=2, backoff=2, max_delay=60):