template method pattern the result looks something like thisrunning stock sync between local and remote system retrieving remote stock items updating local items sending updates to third party send transaction{'items'[{'amount_purchased' 'item_id' 'value' }]'id' nextwe will evaluate the code in terms of what happens in the real world if there is one third-party system you need to integrate withthere will be others what if you are handed not one but two other third-party applications to integrate withyou could do the easy thing and create couple of sprawling if statements to direct traffic inside of the function to each of the three systems you need to cater toresulting in something like the incomplete code snippet that followswhich is included only to demonstrate the effect of the sprawling if on the neatness of the code def sync_stock_items(system)if system ="system "print("running stock sync between local and remote system "print("retrieving remote stock items from system "print("updating local items"print("sending updates to third party system "elif system ="system "print("running stock sync between local and remote system "print("retrieving remote stock items from system "print("updating local items"print("sending updates to third party system "elif system ="system "print("running stock sync between local and remote system "print("retrieving remote stock items from system "print("updating local items"print("sending updates to third party system "elseprint("no valid system"