python examples of design patterns