human
Here's a good function header given the following:
I wrote the below code

    def configDictValidator(d):
        newdict = util.OrderedDict()
        undefined_key_matches = {}
        for key in d.iterkeys():
            if (key not in config):
                match = _get_closest_match(key, config.iterkeys())
                if (match and ignore_undefined):
                    undefined_key_matches[match] = key
                    newdict[key] = d[key]
                elif match:
                    raise ValidationException(("'%s'    is    not    a    configuration    item.    Did    you    mean    '%s'?" % (key, match)))
                elif (not ignore_undefined):
                    raise ValidationException(("'%s'    is    not    a    configuration    item" % key))
                else:
                    newdict[key] = d[key]
        for (configkey, configsetting) in config.iteritems():
            if (configkey in d):
                newdict[configkey] = configsetting.validator(d[configkey])
            elif (configsetting.default is not None):
                newdict[configkey] = configsetting.validator(configsetting.default)
            elif configsetting.required:
                if (configkey in undefined_key_matches):
                    raise ValidationException(("Key    '%s'    is    not    a    valid    configuration    item.    Did    you    mean    '%s'?" % (undefined_key_matches[configkey], configkey)))
                else:
                    raise ValidationException(("Required    key    '%s'    was    not    specified.    You    must    give    a    value    for    this    setting" % configkey))
        return newdict
    configDictValidator.config = config
    configDictValidator.ignore_undefined = ignore_undefined
    return configDictValidator

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

def make_configDictValidator(config, ignore_undefined=False):