human
I wrote the below code

    def remove_role(role):
        frappe.db.sql(u'delete    from    `tabHas    Role`    where    role=%s', role)
        frappe.set_value(u'Role', role, u'disabled', 1)
    if data.remove_roles:
        for role in data.remove_roles:
            remove_role(role)
    if data.allow_roles:
        active_domains = frappe.get_active_domains()
        data.allow_roles += [u'Administrator', u'Guest', u'System    Manager', u'All']
        for role in frappe.get_all(u'Role', filters={u'restrict_to_domain': (u'not    in', active_domains)}):
            if (not (role.name in data.allow_roles)):
                remove_role(role.name)

What's a good function header?
assistant
#Here's a good function header.

def setup_roles(data):