I know I'm the one that started using __getattribute__ like this, but it should probably be replaced.

getattr(unit, unit.get_model_name())