class cooker(appliance)def __init__(selfmodelpricefuel)super(__init__(modelpriceself fuel fuel price property(lambda selfsuper(pricelambda selfpricesuper(set_price(price)the cooker class must reimplement the __init__(method and the price property for the property we have just passed on all the work to the base class the model read-only property is inherited we could create many more classes based on appliancesuch as fridgetoasterand so on the next abc we will look at is even shorterit is an abc for text-filtering functors (in file textfilter py)class textfilter(metaclass=abc abcmeta)@abc abstractproperty def is_transformer(self)raise notimplementederror(@abc abstractmethod def __call__(self)raise notimplementederror(the textfilter abc provides no functionality at allit exists purely to define an interfacein this case an is_transformer read-only property and __call__(methodthat all its subclasses must provide since the abstract property and method have no implementations we don' want subclasses to call themso instead of using an innocuous pass statement we raise an exception if they are used ( via super(callhere is one simple subclassclass charcounter(textfilter)@property def is_transformer(self)return false def __call__(selftextchars)count for in textif in charscount + return count