template method pattern def main()transaction "id" "items""item_id" "amount_purchased" "value" ]}for in [system system system ]print("="* system (system sync_stock_items(system send_transaction(transactionif __name__ ="__main__"main(once againour test code results in the output we would hope for as in the previous sectionthe order of the key value pairs in the dictionaries returned by your implementation might be differentbut the structure and values will remain consistent =========running stock sync between local and remote system retrieving remote stock items from system updating local items sending updates to third party system send transaction to system ({'items'[{'amount_purchased' 'value' 'item_id' }]'id' },=========running stock sync between local and remote system retrieving remote stock items from system updating local items sending updates to third party system