adapter pattern [ ["email"for in user_fetcher fetch_users()]"this is your message""have good dayyou may just as well use the logger class you developed in in the preceding examplethe logger class is just used as an example for every new interface you want to adaptyou need to write new adapterobject type class each of these is constructed with two arguments in its constructorone of which is an instance of the adaptee each of the adapters also needs to implement the send_message(selftopicmessage_bodymethod with the required parameters so it can be called using the desired interface from anywhere in the code if the parameters we pass to each provided_function remain the same as those of the required_functionwe could create more generic adapter that no longer needs to know anything about the adapteewe simply supply it an object and the provided_ functionand we're done this is what the generic implementation of the idea would look likeclass objectadapter(object)def __init__(selfwhat_i_haveprovided_function)self what_i_have what_i_have self required_function provided_function def __getattr__(selfattr)return getattr(self what_i_haveattrimplementing the message-sending adapter in this way is also one of the exercises at the end of this by now you may have realized that you have to do more and more of the implementation yourself this is by design the aim is to guide you in the learning process you should be implementing the code so you gain more intuition about the concepts they address once you have working versionfiddle with itbreak itthen improve upon it arting shots you saw that adapters are useful when you need to make things work after they are designed it is way of providing different interface to subjects to which the interface are provided from the interface provided