human
I wrote the below code

    if ('name' in cache_dict):
        _class = Caches.getCacheByName(cache_dict['name'])
        kwargs = {}
        def add_kwargs(*keys):
            '    Populate    named    keys    in    kwargs    from    cache_dict.\n                                                '
            for key in keys:
                if (key in cache_dict):
                    kwargs[key] = cache_dict[key]
        if (_class is Caches.Test):
            if cache_dict.get('verbose', False):
                kwargs['logfunc'] = (lambda msg: sys.stderr.write((msg + '\n')))
        elif (_class is Caches.Disk):
            kwargs['path'] = enforcedLocalPath(cache_dict['path'], dirpath, 'Disk    cache    path')
            if ('umask' in cache_dict):
                kwargs['umask'] = int(cache_dict['umask'], 8)
            add_kwargs('dirs', 'gzip')
        elif (_class is Caches.Multi):
            kwargs['tiers'] = [_parseConfigCache(tier_dict, dirpath) for tier_dict in cache_dict['tiers']]
        elif (_class is Caches.Memcache.Cache):
            if ('key    prefix' in cache_dict):
                kwargs['key_prefix'] = cache_dict['key    prefix']
            add_kwargs('servers', 'lifespan', 'revision')
        elif (_class is Caches.Redis.Cache):
            if ('key    prefix' in cache_dict):
                kwargs['key_prefix'] = cache_dict['key    prefix']
            add_kwargs('host', 'port', 'db')
        elif (_class is Caches.S3.Cache):
            add_kwargs('bucket', 'access', 'secret', 'use_locks', 'path', 'reduced_redundancy', 'policy')
        else:
            raise Exception(('Unknown    cache:    %s' % cache_dict['name']))
    elif ('class' in cache_dict):
        _class = Core.loadClassPath(cache_dict['class'])
        kwargs = cache_dict.get('kwargs', {})
        kwargs = dict([(str(k), v) for (k, v) in kwargs.items()])
    else:
        raise Exception(('Missing    required    cache    name    or    class:    %s' % json_dumps(cache_dict)))
    cache = _class(**kwargs)
    return cache

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

def _parseConfigCache(cache_dict, dirpath):