Do It yourself Dependency Injection in python