Implement a GPU credit manager for a compute cluster. Each user has a nonnegative credit balance that can be increased (grantCredits(user, amount)), consumed when scheduling jobs (consume(user, amount) -> boolean), and refunded when jobs finish (refund(user, amount)). Support querying a user’s remaining credits (get(user) -> int) and retrieving the top K users by balance (topK(k) -> list). Enforce per-user maximum caps, optional per-organization aggregate caps, and optional credit expirations. Prevent balances from going negative and ensure atomicity under concurrent calls. Target O(log n) time per operation and near-linear space. Describe the data structures, provide pseudocode for each API, and analyze time and space complexity.