Given a list of user API usage records — each containing a user ID, input token count, output token count, and a pricing plan type — compute the total cost for each user. There are two pricing plans: 1. Pay-as-you-go (per-session / per-token): Charges are calculated directly based on the…