def _get_request_wait_time(attempts):
    """ Use Fibonacci numbers for determining the time to wait when rate limits
    have been encountered.
    """

    n = attempts + 3
    a, b = 1, 0
    for _ in range(n):
        a, b = a + b, a

    return a