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

    if (cache_dir is None):
        cache_dir = os.path.expanduser(os.path.join('~', '.keras'))
    if ((md5_hash is not None) and (file_hash is None)):
        file_hash = md5_hash
        hash_algorithm = 'md5'
    datadir_base = os.path.expanduser(cache_dir)
    if (not os.access(datadir_base, os.W_OK)):
        datadir_base = os.path.join('/tmp', '.keras')
    datadir = os.path.join(datadir_base, cache_subdir)
    if (not os.path.exists(datadir)):
        os.makedirs(datadir)
    if untar:
        untar_fpath = os.path.join(datadir, fname)
        fpath = (untar_fpath + '.tar.gz')
    else:
        fpath = os.path.join(datadir, fname)
    download = False
    if os.path.exists(fpath):
        if (file_hash is not None):
            if (not validate_file(fpath, file_hash, algorithm=hash_algorithm)):
                print((((('A    local    file    was    found,    but    it    seems    to    be    incomplete    or    outdated    because    the    ' + hash_algorithm) + '    file    hash    does    not    match    the    original    value    of    ') + file_hash) + '    so    we    will    re-download    the    data.'))
                download = True
    else:
        download = True
    if download:
        print('Downloading    data    from', origin)
        class ProgressTracker(object, ):
            progbar = None
        def dl_progress(count, block_size, total_size):
            if (ProgressTracker.progbar is None):
                if (total_size is (-1)):
                    total_size = None
                ProgressTracker.progbar = Progbar(total_size)
            else:
                ProgressTracker.progbar.update((count * block_size))
        error_msg = 'URL    fetch    failure    on    {}:    {}    --    {}'
        try:
            try:
                urlretrieve(origin, fpath, dl_progress)
            except URLError as e:
                raise Exception(error_msg.format(origin, e.errno, e.reason))
            except HTTPError as e:
                raise Exception(error_msg.format(origin,...

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

def get_file(fname, origin, untar=False, md5_hash=None, file_hash=None, cache_subdir='datasets', hash_algorithm='auto', extract=False, archive_format='auto', cache_dir=None):