Implement a billing calculator for Notion’s new “Workspace” product.
Customers can subscribe to a plan, add optional paid add-ons, buy seats for team members, and purchase AI credits that are consumed on a usage basis.
Your task is to build a class (or set of functions) that can:
Create a workspace with a chosen plan, a non-negative seat count, and an optional billing cycle (monthly or annual).
Add or remove seats at any time; the seat count must never drop below zero.
Add or remove paid add-ons; each add-on has a fixed monthly price per seat.
Purchase AI credits (1 credit = $0.02) at any time; these are usage-based and never expire.
Return the current total bill, computed as:
total = ( (plan_price + Σaddon_prices) × seats × cycle_multiplier ) + (ai_credits × 0.02)
where cycle_multiplier is 1 for monthly and 0.8 for annual (i.e., 20 % discount on the seat-related portion only).
Round every monetary result to exactly two decimal places (banker’s rounding).
The calculator must be stateful: each operation mutates the workspace and subsequent bill queries reflect the new state.