import json
from pathlib import Path
rows=[]
for fee,client_review in [(15000,0),(12000,0),(13500,0),(13500,1000)]:
 rows.append(dict(fee=fee,agency_delivery_cost=7000,client_review_cost=client_review,agency_contribution=fee-7000,client_total_cost=fee+client_review,joint_delivery_saving=10000-7000-client_review))
Path(__file__).with_name('results.json').write_text(json.dumps({'illustrative_fee_cases':rows,'wine_access_reconstruction':{'cost_cushion':311300/(27500*26),'gross_profit_difference':.166,'approximate95interval':[.166-1.96*.520,.166+1.96*.520],'source':'DubeXu Tables5and7; annualisation assumptions not observed annual profit'}},indent=2))
