Implement a rate limiter (similar to a token bucket algorithm).
Asked in the technical phone screen stage. Given nondecreasing request timestamps, a bucket capacity, and a refill rate, determine whether each request is allowed. The bucket starts full, and every request consumes one token.
Implement def rate_limiter(request_times, capacity, refill_rate):. Return a boolean list with one result per timestamp. Refill tokens continuously between requests, capped at capacity.
def rate_limiter(request_times, capacity, refill_rate):