all this line does is get the set of methods and properties that the class hasincluding any parent classes in its class hierarchyif set(cls __abstractmethods__<attrsthis line uses set notation to see whether the set of abstract methods in this class have been supplied in the candidate class note that it doesn' check to see whether the methods have been implementedjust if they are there thusit' possible for class to be subclass and yet still be an abstract class itself return true if all the abstract methods have been suppliedthen the candidate class is subclass of this class and we return true the method can legally return one of the three valuestruefalseor notimplemented true and false indicate that the class is or is not definitively subclass of this classreturn notimplemented if any of the conditionals have not been met (that isthe class is not medialoader or not all abstract methods have been supplied)then return notimplemented this tells the python machinery to use the default mechanism (does the candidate class explicitly extend this class?for subclass detection in shortwe can now define the ogg class as subclass of the medialoader class without actually extending the medialoader classclass ogg()ext oggdef play(self)print("this will play an ogg file"issubclass(oggmedialoadertrue isinstance(ogg()medialoadertrue case study let' try to tie everything we've learned together with larger example we'll be designing simple real estate application that allows an agent to manage properties available for purchase or rent there will be two types of propertiesapartments and houses the agent needs to be able to enter few relevant details about new propertieslist all currently available propertiesand mark property as sold or rented for brevitywe won' worry about editing property details or reactivating property after it is sold