human
I wrote the below code

    def prettify(field_name):
        field_name = re.sub('(?<!\\w)[Uu]rl(?!\\w)', 'URL', field_name.replace('_', '    ').capitalize())
        return _(field_name.replace('_', '    '))
    summary = {}
    for (key, error) in error_dict.iteritems():
        if (key == 'resources'):
            summary[_('Resources')] = _('Package    resource(s)    invalid')
        elif (key == 'extras'):
            summary[_('Extras')] = _('Missing    Value')
        elif (key == 'extras_validation'):
            summary[_('Extras')] = error[0]
        else:
            summary[_(prettify(key))] = error[0]
    return summary

What's a good function header?

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

def error_summary(error_dict):