Liskov Substitution Principle Python