abstraction of something for something else in python