def METHOD_NAME(target_class, *mixin_classes):
   '''Add entries from python class dictionaries to a boost extension class.
      It is used as follows:
            class _():
              def method(...):
                ...
            bp.inject(extension_class, _)
      instead of the previous mechanism of
            class _(bp.injector, extension_class):
              def method(...):
                ...
      which does not work in python 3.
   '''
   for m in mixin_classes:
     for key, value in m.__dict__.items():
       if key not in ("__init__",
                      "__del__",
                      "__module__",
                      "__file__",
                      "__dict__") and (key != '__doc__' or value):
         setattr(target_class, key, value)