human
I wrote the below code

    def check_illegal_characters(fieldname):
        validate_column_name(fieldname)
    def check_unique_fieldname(fieldname):
        duplicates = filter(None, map((lambda df: (((df.fieldname == fieldname) and str(df.idx)) or None)), fields))
        if (len(duplicates) > 1):
            frappe.throw(_(u'Fieldname    {0}    appears    multiple    times    in    rows    {1}').format(fieldname, u',    '.join(duplicates)))
    def check_fieldname_length(fieldname):
        validate_column_length(fieldname)
    def check_illegal_mandatory(d):
        if ((d.fieldtype in no_value_fields) and (d.fieldtype != u'Table') and d.reqd):
            frappe.throw(_(u'Field    {0}    of    type    {1}    cannot    be    mandatory').format(d.label, d.fieldtype))
    def check_link_table_options(d):
        if (d.fieldtype in (u'Link', u'Table')):
            if (not d.options):
                frappe.throw(_(u'Options    required    for    Link    or    Table    type    field    {0}    in    row    {1}').format(d.label, d.idx))
            if ((d.options == u'[Select]') or (d.options == d.parent)):
                return
            if (d.options != d.parent):
                options = frappe.db.get_value(u'DocType', d.options, u'name')
                if (not options):
                    frappe.throw(_(u'Options    must    be    a    valid    DocType    for    field    {0}    in    row    {1}').format(d.label, d.idx))
                else:
                    d.options = options
    def check_hidden_and_mandatory(d):
        if (d.hidden and d.reqd and (not d.default)):
            frappe.throw(_(u'Field    {0}    in    row    {1}    cannot    be    hidden    and    mandatory    without    default').format(d.label, d.idx))
    def check_width(d):
        if ((d.fieldtype == u'Currency') and (cint(d.width) < 100)):
            frappe.throw(_(u'Max    width    for    type    Currency    is    100px    in    row    {0}').format(d.idx))
    def check_in_list_view(d):
        if (d.in_list_view and (d.fieldtype in...

What's a good function header?

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

def validate_fields(meta):