ptrblck:

If you don’t want to use these modules, you could either remove them from the __init__


If I remove them from __init__, where do I define them? Since what head has to be chosen depends on the conditional parameter that will be passed to the __init__ i.e. the head_type. What I could perhaps do is make separate methods within the class for each head and put conditions in the __init__ itself. Any other cleaner solution for this?