def MetadataMixin(cls_name):
    """Mixin class that provides metadata-fields and methods"""
person_role_cls_name = 'Person%sRole' % cls_name
person_role_cls = Base._decl_class_registry[person_role_cls_name]


class Mixin(object):
    persons = association_proxy('persons_roles', 'person', creator=
        person_role_cls)
return Mixin
SQLAlchemy: Multiple Inheritance with dynamic 'association_proxy' creator function