observer pattern def main()wallet wallet(user user(walletbadges badge("fun badge" )badge("bravery badge" )badge("missing badge" user badges extend(badgestasks [task(user )task(user )task(user )for task in taskstask register(wallettask register(userfor badge in badgestask register(badgefor task in taskstask update_all(print(userif __name__ ="__main__"main(parting shots you should have clear understanding of the observer pattern by nowand also have feeling for how implementing this pattern in the real world allows you to build systems that are more robusteasier to maintainand joy to extend