design pattern quick reference def __str__(self)return str(self statedef main()state_machine statemachine(print(state_machinestate_machine switch(print(state_machineif __name__ ="__main__"main(strategy strategy py def executor(arg arg func=none)if func is nonereturn "strategy not implemented return func(arg arg def strategy_ (arg arg )return f_ (arg arg def strategy_ (arg arg )return f_ (arg arg template method template_method py import abc class templateabstractbaseclass(metaclass=abc abcmeta)def template_method(self)self _step_ (self _step_ (self _step_n(