human
I wrote the below code

    from frappe.core.doctype.doctype.doctype import validate_fields_for_doctype
    doctype = data[u'doctype']
    update_schema = False
    def sync(key, custom_doctype, doctype_fieldname):
        frappe.db.sql(u'delete    from    `tab{0}`    where    `{1}`=%s'.format(custom_doctype, doctype_fieldname), doctype)
        for d in data[key]:
            d[u'doctype'] = custom_doctype
            doc = frappe.get_doc(d)
            doc.db_insert()
    if data[u'custom_fields']:
        sync(u'custom_fields', u'Custom    Field', u'dt')
        update_schema = True
    if data[u'property_setters']:
        sync(u'property_setters', u'Property    Setter', u'doc_type')
    if data.get(u'custom_perms'):
        sync(u'custom_perms', u'Custom    DocPerm', u'parent')
    print(u'Updating    customizations    for    {0}'.format(doctype))
    validate_fields_for_doctype(doctype)
    if (update_schema and (not frappe.db.get_value(u'DocType', doctype, u'issingle'))):
        from frappe.model.db_schema import updatedb
        updatedb(doctype)

What's a good function header?

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

def sync_customizations_for_doctype(data):