# Exercise scaffold. Reference implementation is in a separate directory."""G01: a finite state model. This is sequential, not a thread model."""fromcollectionsimportdequefromdataclassesimportdataclass@dataclass(frozen=True)classStock:available:intsold:int=0defreserve(state:Stock,amount:int)->Stock:raiseNotImplementedError('Implement this contract from the book.')defexplore(initial:int,max_amount:int=4)->set[Stock]:raiseNotImplementedError('Implement this contract from the book.')