template method pattern in the most general sensethe template method pattern will look something like this when implementedimport abc class templateabstractbaseclass(metaclass=abc abcmeta)def template_method(self)self _step_ (self _step_ (self _step_n(@abc abstractmethod def _step_ (self)pass @abc abstractmethod def _step_ (self)pass @abc abstractmethod def _step_ (self)pass class concreteimplementationclass(templateabstractbaseclass)def _step_ (self)pass def _step_ (self)pass def _step_ (self)pass this is the first instance where the use of python' abstract base class library is truly useful up until nowwe got away with ignoring the base classes that are so often used by otherless dynamic languages because we could rely on the duck-typing system with the template methodthings are little different the method used to execute the process is included in the abstract base class (abc)and all classes that inherit from this class are forced to implement the methods for each step in their own waybut all child classes will have the same execution method (unless it is overridden for some reason