def add_visibility_fields(iface):
    fields = {}
for name, attr in iface.namesAndDescriptions():
    fields[name] = attr
if isinstance(attr, schema.Field):
    fields['visible_' + name] = schema.Bool(title='Display: ' + attr.title)
return InterfaceClass(iface.__name__, iface.__bases__, fields)
How to dynamically add attributes to an interface