xAI asks this in two distinct flavors across rounds. Coding variant (Round 1): given a pre-built template with DistributedCache and TokenBucket classes, implement (1) refillTokenBucket with lazy-refresh logic — compute tokens to add from elapsed time since last refill, cap at max capacity, update the refill timestamp — and (2)…